Insert steps into a script

Insert think time steps

The time that a user waits between performing successive actions is known as the think time. Vusers use the lr_think_time function to emulate real-user think time. When your record a Vuser script, VuGen records the actual think times and inserts appropriate lr_think_time statements into the Vuser script. You can edit the recorded lr_think_time statements, and manually add more lr_think_time statements to a Vuser script.

To insert a think time step:

Select Design > Insert in Script > New Step > Think Time and specify the desired think time - in seconds.

Note: When you record a Java Vuser script, lr_think_time statements are not generated in the Vuser script.

You can use the runtime settings to influence how the lr_think_time statements operate when you execute a Vuser script. For details, see the General > Think Time view in the runtime settings.

Back to top

Insert debug messages

You can add a debug or error message using VuGen's user interface. For debug messages you can indicate the level of the text message—the message is only issued when your specified level matches the message class. You set the message class using lr_set_debug_message.

To insert a debug message:

Select Design> Insert in Script >New Step. Double-click lr_debug_message in the Steps Toolbox.

Back to top

Insert error and output messages

For protocols that support the Step Navigator, such as Web, Winsock, and Oracle NCA, you can add an error or output message using the user interface. A common usage of this function is to insert a conditional statement, and issue a message if the error condition is detected.

To insert an error or output message:

Select Design > Insert in Script >New Step > Error Message or Output Message, and enter the message. An lr_error_message or lr_output_message function is inserted at the current point in the script.

Note: An Error Message step in a script does not automatically set the Replay status to Failed.

Back to top