Overriding Engine Callbacks - SequenceFilePostStepFailure

Purpose

This example demonstrates how to retry or force failed steps to pass using the SequenceFilePostStepFailure Engine callback sequence. You can force steps in the MainSequence or in a subsequence.

Example File Location

<TestStand Public>\Examples\Fundamentals\Overriding Engine Callbacks\Overriding SequenceFilePostStepFailure Callback.seq

Highlighted Features

Callbacks

Major API

Step.CancelStepCallback

Prerequisites

None

How to Use This Example

Complete the following steps to review the sequences and steps in this example.

  1. On the Sequences pane, select the MainSequence. The MainSequence contains two Numeric Limit Test steps and one Sequence Call step.
  2. On the Sequences pane, select the SubSequence sequence. The SubSequence sequence contains Numeric Limit Test steps, three of which are designed to fail in the following ways to demonstrate how TestStand behaves when a step fails:
    • One test fails only the first time
    • One test fails every time
    • One test fails every time but does not cause the sequence to fail
  3. On the Sequences pane, select the SequenceFilePostStepFailure callback. The first step, which uses the ActiveX/COM Adapter, sets the Step.CancelStepCallback property to True to suppress any other failure callbacks for a failed step, and a series of Statement steps collects information about the step failure.
  4. On the Steps pane, select the Choose Action step.
  5. On the Step Settings pane, click the Text and Buttons tab. The Message Expression control specifies an expression that provides information about the step failure, and the step specifies buttons so you can choose to retry the test, force the test to pass, continue the execution, or terminate the execution. The Select step that follows the Choose Action step specifies the following cases that correspond to the buttons you can click in the message popup that the Choose Action step creates:
    • Case 1 changes the next step index to retry the step that failed
    • Case 2 forces the failed step to pass
    • Case 3 continues the sequence without taking any other action
    • Case 4 terminates the execution

Complete the following steps to run the example.

  1. Select Execute»Single Pass to run the sequence.
  2. TestStand launches the Step Failed dialog box for the first step that fails. Click the Retry button to run the failed step again. The step passes on the second attempt.
  3. TestStand launches the Step Failed dialog box for the next step that fails. Click the Force to Pass button to force the failed step to pass.
  4. TestStand launches the Step Failed dialog box for the next step that fails. Click the Continue button to allow the step to fail without causing the sequence fail.
  5. When execution completes, review the report on the Report pane. The status of the first attempt of the Fail only the first time step is Failed, Retrying Step because you clicked the Retry button after the step failed once. The status of the Fail every time step is Passed because you clicked the Force to Pass button when the step failed.