Controlling Test Flow

while keep_running()

The while keep_running(): loop is required in all Python scripts. Test configuration must be performed prior to reaching this loop.

The code inside this loop will be executed once per pass. Pass behavior is configured using these files:

set_var('passtimer', 15)            # Ensures each pass runs for 15 seconds
set_var('passes', 3)                # Runs the test three times

while keep_running():
    #
    # put test actions here
    #

More information about passtimer settings

iSleep

iSleep allows the test script to wait for a specified time before resuming program actions.

iSleep(1000)        # Waits for one second while any IO tests that are running operate in the background.

Warning

Using other standard delay functions (like time.sleep) is not recommended. The script will be unresponsive to test control and script pass timing will be affected.

By default a message will be logged when an iSleep begins. To suppress this message, set the optional quiet parameter to 1:

iSleep(5000, 1)  # Wait for five seconds while suppressing iSleep log messages