background image
<< Creating a Java Vuser Script | Understanding Java Vuser Scripts >>
<< Creating a Java Vuser Script | Understanding Java Vuser Scripts >>

Enhance your script with synchronization points

Java Vuser Scripts · Creating Java Vuser Scripts
Creating Vuser Scripts
Chapter 25, page 425
5
Add transactions to the script. Choose Insert > Start Transaction to specify the
beginning of a transaction, and Insert > End Transaction to specify the end of a
transaction.
It is recommended to mark the first set_window statement as a transaction to
verify that the applet or application loaded correctly.
6
Use the Insert menu to add rendezvous points, comments, or messages to the
script.
7
Enhance your script with synchronization points (win_exists, obj_exists,
obj_wait_info), and add lr_think_time statements to emulate user think time.
8
Parameterize your script. Click the constant you want to replace with a parameter,
perform a right-click and choose Replace with Parameter. For more information
see Chapter 5,
Defining Parameters
.
9
Set the appropriate Run Time settings for applet url or application name, run
mode, think time, iterations and logging.
10
Save the script and test it as a standalone script from VuGen.
lr_start_transaction("first_win");
set_window("FIRST_WINDOW");
button_set("RadioCheckbox_12",ON);
lr_end_transaction("first_win", LR_PASS);