| || |
Variables are not working
I am new in OpenSTA, my problem is with variables that I created:
CHARACTER*512 USERNAME ( "ab", "ac", "ad", "ae" ), LOCAL
CHARACTER*512 PWORD ( "ba", "ca", "da", "ea" ), LOCAL
CHARACTER*512 MY_PASSWORD, LOCAL
I did also Mutex before PRIMARY POST URI
ACQUIRE MUTEX "LOGIN"
RELEASE MUTEX "LOGIN"
and altered Body part in this way:
,BODY "loginid="+MY_USERNAME+"&passwd="+MY_PASSWORD+ ""
when I click Replay button the script uses for log in username:ab a password: ba , that is OK but then it is OVER, it doesnt continue with username: ac and pword:ca and so on...
Q is: What should I do in order the script runs through all the variables??
Thx a lot for your answers.
Re: Variables are not working
A local scope variable is reset for every instantiation of the script. Change the scope to either thread, script, or global to avoid the list pointer being reset each time the script is entered.
To prove this to yourself, leave it as local and do something like
Run this for 2 VUs and notice the output. Each time you enter the script the list pointer will be reset to the start of the list. Now, change the scope to thread and run the script for 2 VUs notice whats happening. Now try scope of SCRIPT and run for 2 VUs. This will illustrate the behavior of the different scoping options.