Pause

3.2.13 Pause

DESCRIPTION

Pause - Pause the script execution. If T-Plan Robot is executing in GUI mode, the Pause button/menu item gets selected and the user can deselect the button or the menu item to resume the execution.

If the script is being executed in CLI mode, a message is printed out into the console and the user can press a key to resume the execution.

The Pause command can be used e.g. to pause execution when a runaway behaviour is detected.

Though the usual way is to exit the script with an error exit code (e.g. 'Exit 1'), some test suites may prefer to send an e-mail to the responsible person, pause the execution and wait for human help.

SYNOPSIS

pause <description> 

OPTIONS

description

- Optional description of the reason why the script was paused. This description will be displayed in the report (if defined) and printed out to the console in case of CLI mode execution.

RETURNS

The command always returns 0 (zero).

EXAMPLES

Compareto "application.png" 
if ({_EXIT_CODE} > 0) {
    # Cry for help - send a screenshot via E-mail and pause
    Screenshot runaway.png
  Sendmail to="tester@dummyserver.com" from="robot@dummyserver.com" server="mail.dummyserver.com" subject="Runaway behavior detected - see attached picture. Please help!" attach="{_REPORT_DIR}/runaway.png"
    Pause "Runaway behavior detected" 
}

- When image comparison fails, send a screenshot by E-mail to the tester and pause the execution.