Producing a Fail Result for a Sequence when Step has Runtime Errors

Updated Dec 11, 2017

Reported In

Software

  • TestStand

Issue Details

When an error occurs in a step during a sequence, TestStand pops up a Run-Time Error dialog box. By default, choosing to Ignore the run-time error will produce a "Pass" result for the sequence when all other steps in the sequence have passed.

How can I have TestStand produce a "Fail" result when any step in a sequence has had a run-time error?

Solution

A Sequence Callback can be used to set the test result that TestStand provides when an error occurs during a step:
  1. Open the sequence file (.seq) in TestStand.
  2. In the main menu, select Edit»Sequence File Callbacks.
  3. Select SequenceFilePostStepRuntimeError from the list.
  4. Click Add, then click Edit. You will be taken to a new sequence in the same file.
  5. Insert a statement step, and set its expression to RunState.Caller.RunState.SequenceFailed = True.

Additional Information

This expression allows you to set the Caller's (which is MainSequence) SequenceFailed flag to TRUE, and that sequence will now be marked as "Failed".

WAS THIS ARTICLE HELPFUL?

Not Helpful