lr.peek_events
Checks for events.
JavaScript
function lr.peek_events( )
VBScript
Sub lr.peek_events( )
| Runtime Functions |
The lr.peek_events function suspends the Vuser script run and checks for events before resuming.
Return Values
No value returned.Parameterization
Standard parameterization is not available for this function.
Example
In the following example, lr_peek_events enables the Vuser to pause at the start of each iteration. Pause events that occur during an iteration are effective only at the beginning of the next iteration.
' This example is meant to be run in iterations. ' check for events lr.output_message "About to check for events. Pauses can be intercepted." lr.peek_events lr.output_message "Finished checking for events/pauses." lr.start_transaction "trans1" ' implement your logic here */ lr.think_time 10 lr.output_message "Running test steps..." lr.end_transaction "trans1",lr.AUTO Action = lr.PASS
Example: The Replay Log below shows the use of iterations:
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
About to check for events. Pauses can be intercepted.
Finished checking for events/pauses.
Notify: Transaction "trans1" started.
Running test steps...
Notify: Transaction "trans1" ended with "Pass" status (Duration: 0.0005).
Ending action Action.
Ending iteration 1.
Starting iteration 2.
Starting action Action.
About to check for events. Pauses can be intercepted.
Finished checking for events/pauses.
Notify: Transaction "trans1" started.
Running test steps...
Notify: Transaction "trans1" ended with "Pass" status (Duration: 0.0005).
Ending action Action.
Ending iteration 2.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.

