background image
<< Initializing Shared Variables | Printing and Exporting a Suite >>
<< Initializing Shared Variables | Printing and Exporting a Suite >>

Synchronizing virtual testers

112
Chapter 4 - Implementing Tests
To initialize a shared variable:
s
Open a suite, and then click
Suite > Edit Shared Variables
.
Shared variables are useful in the following situations:
s
To synchronize virtual testers ­ Use for more specific coordination than a
synchronization point provides. For example, you can limit a transaction so that
only five virtual testers perform it at once. In that case, use a shared variable with
the appropriate wait routine in your scripting language.
s
To block a virtual tester from executing until a global event occurs ­ It is easier to
set an event and a dependency than to set a shared variable. However, if the event
depends on some logic within a test script, you must use a shared variable.
s
To count loops within a test script ­ If you want to set a loop for an entire test
script, it is easier to set a selector or an iteration count within the suite. However, if
only a portion of the test script loops, set a shared variable to control the number of
iterations of that loop.
s
To monitor specific transaction counts and conditions ­ When you monitor a suite,
shared variables provide detailed information about the progress or state of a suite
run.