background image
<< Changing the Way Random Numbers Are Generated | Synchronizing virtual testers >>
<< Changing the Way Random Numbers Are Generated | Synchronizing virtual testers >>

Initializing Shared Variables

Implementing Tests as Suites
111
s
Same and not reseeded
Generates the same seed for each virtual tester and does not
reseed the random number generator at the beginning of each test script. This is
generally not a desirable option to select when modeling a realistic workload,
because each virtual tester that runs the same test script behaves in the same way.
However, this option may be useful for certain types of stress testing.
s
Same and reseeded
Generates the same seed for each virtual tester and reseeds the
random number generator at the beginning of each test script. This generally is not
a desirable option to select when modeling a realistic workload, because each
virtual tester that runs the same test script behaves in the same way, and short
pseudorandom sequences are not realistic.
However, this option may be useful for certain types of stress testing. For example,
if you have a suite with a shared datapool with the seed set as unique and not
reseeded, each virtual tester and iteration has a different seed that gives random
data across all virtual testers and all iterations. To see what happens when all
virtual testers access the same data pattern over and over again, set the seed as
same and reseeded for all virtual testers.
To change the behavior of the default random number generator:
s
Open a suite, and then click
Suite > Edit Settings
.
The VU routines that generate random numbers are
NegExp
,
Rand
, and
Uniform
.
For more information about these routines, see the
VU Language Reference
or the
Rational Test Script Services manual for your language.
Initializing Shared Variables
TestManager lets you initialize shared variables in a suite. A shared variable
maintains its value across all test scripts in a suite. Each virtual tester can access and
change the shared variable.