lr.think_time

Pauses execution between commands in a script.

JavaScript

function lr.think_time(thinkTime)

VBScript

Sub lr.think_time(thinkTime)
Runtime Functions

Arguments

NameComments
thinkTimeThe length of the pause, in seconds.

lr.think_time allows you to pause test execution during a run. This is especially useful in simulating think time, the time a real user pauses to think between actions.

When using cross-step downloads or asynchronous functions of any kind, a long think time may cause the download to time out.

Return Values

No value returned.

Parameterization

Standard parameterization is not available for this function.

Example

In the following segment, lr.think_time instructs the test run component to pause for 1 second before outputting the Vuser IP string.

    lr.start_transaction"test"
    lr.think_time 1
    lr.output_message "vuser: " + lr.get_vuser_ip()
    lr.end_transaction "test", lr.PASS}