In NI TestStand, when a step generates a runtime error or evaluates to a Failed result, the execution engine follows its default behavior. Typically, this includes displaying a runtime error dialog, stopping execution, or moving the execution to the Cleanup group.
TestStand provides Sequence File callbacks that allow you to intercept such execution events and modify the execution flow programmatically. In particular:
SequenceFilePostStepRuntimeError is invoked after a step generates a runtime errorSequenceFilePostStepFailure is invoked after a step completes with a Failed result
By leveraging these callbacks and explicitly setting the NextStepIndex property of a Sequence, you can redirect execution to any step of any sequence in the call stack. This approach allows you to override the default behavior and implement custom recovery or continuation logic.
This tutorial demonstrates two independent flow-control scenarios within the same Main sequence: one for handling runtime errors and another for handling step failures.