SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member
    Join Date
    Nov 2002
    Location
    New York, NY
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Architectural Question

    I have a question for all the OpenSTA gurus on the best way to accomplish something. In the example from the proof of concept thread, we created a script that would take input from a data file and load it into an array. That array is used during the execution of the script to dynamically replace the URL of the GET request. To take this a step further now, I would like to use several client machines with multippe users on each to generate traffic on the given sites. What is the best way, from an architectural standpoint, to populate this array only once and have all the scripts access it?

    Thanks,
    Chris

    ------------------

  2. #2
    Member
    Join Date
    Dec 2002
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Chris,

    I have never tried this, but I think GLOBAL Array might be the solution for your problem.

    This will be the architecture -
    MASTER MACHINE -
    1. contains the data file with URLS
    2. runs the script that will generate a global array that will be in used in subsequent scripts
    CLIENT MACHINES -
    1. run the test by using the GLOBAL array generated in script1 (run on master).

    What do you think?
    I will try and implement this tomorrow, but I wanted to share this with you right away. So you can be the guinea pig
    Good Luck!

    ------------------

  3. #3
    Senior Member
    Join Date
    Nov 2002
    Location
    New York, NY
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Right. That's exactly what I was thinking, but there are a few issues. First, the array will have to be generated before the actual test starts. With that, it will have to be its own script that is executed before the main load/stress test. So this implies that there is some sort of scheduling involved. Second, the master machine will have to run and manage the tests. Therefore, the client machines will not have to run the script to generate the array, rather it will just use the array that was generated once by the master while exectuting the load/stress test script. My question is: what is the best way to satisfy both of these concerns? Thanks for the input!

    ------------------

  4. #4
    Member
    Join Date
    Dec 2002
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Yes, you are right; you will need scheduling and you need to split the scripts.

    At the minimum, there will be two scripts -
    1. SCRIPT1 - will generate a global array from the data file
    2. SCRIPT2 - will consume the global array generated by script1. You might include randomization based on the user to pick a cell from the array.

    I have never worked with Virtual User variables like Virtual User ID, Total Users etc. I am not sure if SCL has that capabilities, but it does; the randomization will be good.

    You will need scheduling so that SCRIPT2 will start after SCRIPT1 completes.

    I hope this makes sense,

    ------------------

  5. #5
    Member
    Join Date
    Dec 2002
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Chris,
    How did your test go?

    I also found out that you can terminate a particular VU by using <a href = "http://opensta.org/docs/sclref10/imp3ln60.htm#20060">DETACH {THREAD}</a>statement.

    Also look at the following commands for loading number of active users, etc -
    <A HREF = "http://opensta.org/docs/sclref10/imp3l101.htm#21009">LOAD ACTIVE USERS</A>
    Also, look at all the MISCELLANEOUS COMMANDS

    Let me know if this helps!

    ------------------


    [This message has been edited by kkoditha (edited 02-08-2003).]

  6. #6
    Senior Member
    Join Date
    Nov 2002
    Location
    New York, NY
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Can someone clarify something for me? For this script how do I reference that global array so that the script that references it compiles? Each time it is saying that the variable is not defined at the script scope.

    It's kind of confusing from the documentation definition:

    Global variables are accessible to any thread running any script under the same Test Manager. The space for global variables is deallocated when the Test Manager in question is closed down.




    ------------------

  7. #7
    Member
    Join Date
    Dec 2002
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Did you define the global variable in the global_variables.inc file? Here is how I defined my array in the global file.

    CHARACTER*512 TEST_URL, GLOBAL

    and I dont get any compilation error.

    ------------------

  8. #8
    Senior Member
    Join Date
    Nov 2002
    Location
    New York, NY
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    I found out that the documentation was actually created before the first release and is quite old. The true idea of a global variable within the same test was never implemented. The way to accomplish this is to put the variable into the include file, but there is no need to specify that it's global. Thanks!

    ------------------

  9. #9
    Junior Member
    Join Date
    Feb 2008
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    [profanity removed]. It doesn't work this way now. I think it's because of version of OSTA. But you really have to declare in globals.inc your array as GLOBAL, and don't forget to run your scripts from test environment (that is, put them in test before)

  10. #10
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Architectural Question

    Two things; First, there is no need to declare Global variables in Global_Variables.inc, but its a good programming practice. Also, just referencing a variable in globals.inc does NOT make it global. It is the SCOPE attribute in the data declaraion that determines scope... the name of the .inc file is irrelavant.

    Second, you can solve your problem either with a character list with scope script or a global array with scope global. The list is created a "compile time" where the array needs to be populated at run time from a file. Either way, the scoping will work properly across a distributed test. Obviously the array based solution will take a lot more work due to syncronization issues. Once they are loaded, there is very little difference between the two other then one is scoped script and the other Global.

    The list solution looks like this;

    1) Declare all the URLs in a string list in your script with a scope of SCRIPT

    <font class="small">Code:</font><hr /><pre>character*32 urlList ( &amp;
    "www.foobar.com", &amp;
    "www.foobar1.com", &amp;
    "www.foobar2.com", &amp;
    "www.foobar3.com", &amp;
    "www.foobar4.com" ), script

    ! To get a unique value from the list; aquire mutex, next urlList, localVar = urlList, release mutex

    </pre><hr />

    There is no limit to the size of this list and you don't need to pupulate an array from a file because the list is populated before any scripts run.

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:21 PM.

Copyright BetaSoft Inc.