background image
<< Changing the Number of Start Test Scripts | Initializing Shared Variables >>
<< Changing the Number of Start Test Scripts | Initializing Shared Variables >>

Changing the Way Random Numbers Are Generated

110
Chapter 4 - Implementing Tests
Changing the Way Random Numbers Are Generated
Each virtual tester has a seed, which generates random numbers in a test script. These
random numbers affect a virtual tester's think time, random number library routines,
and random access in datapools. Seeds are, primarily, either unique or the same:
s
With a unique seed, each virtual tester that runs the same test script has a slightly
different behavior.
For example, if one virtual tester thinks for 1.3 seconds before executing the first
command, the second virtual tester might think for 2.4 seconds. Although the
individual think times vary, they have the same distribution around a mean value.
The seeds also affect the library routines involving random numbers. For example,
in the VU language, if the first virtual tester calls the
uniform
routine twice and
receives the numbers 5 and 3, other virtual testers in that group probably receive
different numbers, bounded only by the minimum and maximum values that are
set in the test script.
s
With the same seed, each virtual tester that runs the same test script has exactly the
same behavior.
For example:
If the first virtual tester thinks for 1.3 seconds before executing the first
command, the second virtual tester (and all subsequent virtual testers) also
thinks for 1.3 seconds before executing that command.
If the first virtual tester calls the
uniform
routine twice and receives the
numbers 5 and 3, all other virtual testers in that group also receive 5 and 3.
You can also set whether the random number generator is reseeded at the beginning
of each test script. In general, it is better not to reseed, because one long
pseudorandom sequence is more realistic than many short ones.
Seeds are defined in one of the following ways:
s
Unique and not reseeded
Generates a unique seed for each virtual tester and does
not reseed the random number generator at the beginning of each test script. Each
virtual tester in a user group behaves slightly differently. This is the most
commonly used option in performance testing.
s
Unique and reseeded Generates a unique seed for each virtual tester and reseeds
the random number generator at the beginning of each test script. Each virtual
tester in a user group behaves slightly differently, but the numbers are reseeded at
the beginning of each test script. This option is very effective for government LTD
(Live Test Demonstration) testing.