I want to dynamically change the input parameters for an ACT test. For now a
simple test is to put a global variable at the top of the script and
increment it with each inocation. This seems to fail because it seems that a
new instance of the script is run each time so the "global" variable is
initialized with each invocation. What is the recommended way to maintain
state over the lifetime of the test?
Thank you.
Kevin
Reading the docs I think that I want to use Cookies but I still need an
example. Can I use cookies to help me maintain state even when I have the
users "automatically" generated by ACT? Any examples of using cookies would
be helpful. I am especially not sure what to use for path and how to set the
cookie so I can use it. The docs mention editing the cookies associated with
a user (specifically the "Value") but I was unable to edit the blank form
that was brought up for the user.
Thank you.
Kevin
> I want to dynamically change the input parameters for an ACT test. For now a
> simple test is to put a global variable at the top of the script and
[quoted text clipped - 6 lines]
>
> Kevin
Rene Schrieken - 14 Dec 2004 19:17 GMT
You can call GetGlobalIndex(1) it will return 0 the first time the Test is
run.
Some thing like this will work:
Dim gc = GetGlobalIndex(1)
if gc=0 then
gc = 2004 ' initialize global
end if
Call SendRequest1()
gc=gc+1
SetGlobalIndex 1, gc
If your test runs for 10 iterations the last test will run with 2014. The
next time you start a test it will again start on 2004.
If you use GetGlobalVariable the return value can be tested with IsEmpty, it
will return true on the first call.
René
Kevin Burton - 15 Dec 2004 05:59 GMT
Thank you. This was very helpful.
I stumbled upon Get/SetGlobalVariable. I did not know about Get/SetGlobalIndex
Kevin
> You can call GetGlobalIndex(1) it will return 0 the first time the Test is
> run.
[quoted text clipped - 17 lines]
>
> René