Return Statement Step in Step Configuration Wizard

  1. While in the Script Steps pane, add a step by choosing the Actions > Add step... command.
  2. Select a Return step type, click the button to validate the selection, and specify the following parameters:
    • Run Type: A Return step can only be executed sequentially (Sequential).
    • Delay: A delay specifying by how much step start is delayed. A delay value is automatically set when the step is added using the Capture functionality.
    • Timeout: A period of time after which the step execution is automatically terminated.
    • Ignore step: When this option is selected, the step is skipped at execution time. Selecting this option is equivalent to right-clicking a step in the Script Steps table and choosing the Exclude command from the context menu that appears.
    • Description: An optional step description can be associated with a step.

    Click Next.

  3. In the Value field, specify a TestComposer variable by clicking into the field and editing its name in place, or select an existing variable by clicking the button and choosing it from the window that appears. Alternatively specify a constant value denominating a script success status (any non-zero value) or a script failure status (0).
  4. In the Message field specify a message string that appears in the application logs.

    Click Next.

  5. Verify the step summary information and revert to a previous configuration step if needed. Click Finish.

Example:

  If $result == "pass"
    TclEval puts "execution successful!"
    Return 1 "test passed"
 EndIf
 Assign status 1
 Return $status "test passed"