NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Force TestStand Step to Fail When Error Occurs

How do you make a TestStand sequence step Fail when an Error occurs from the called LabVIEW VI?  I don't want to add a step to check after the step nor do I want to add an analysis of all the steps in the Cleanup.  Isn't there an easy way to do this?  Some post expression similar to
 
Step.Result.Error.Occurred == True ? Step.Result.PassFail == True : Step.Result.PassFail == False
 
This doesn't seem to work.  The test report always has the test step as "Passed" even when I put Step.Result.PassFail == True
Message 1 of 5
(5,876 Views)

Hi mase26,

Use the Callback Sequence SequenceFilePostStepRuntimeError. In this sequence, set Parameters.Step.Result.Status = "Failed" and Parameters.Step.Result.PassFail = False.

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 5
(5,868 Views)
Mase26,

another point in addition to Rays comment:
You used the "==" instead of "=" in your assignment. This could be all the problem here....

hope this works out,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 5
(5,860 Views)

Norbert B.

 

I was just typing the command in the forum, the syntax error is not in the TestStand code.

0 Kudos
Message 4 of 5
(5,857 Views)

mase26 -

When an error occurs running a step in TestStand, it basically stops processing the rest of the step and just sets the status. The only thing that does occur is that the if the Ignore Errors property is set on the step, TestStand sets the Step.Result.Error.Occurred to False. What I have done in the past is either use the callback mentioned above to always do this, or for a single case, make the step ignore errors and add another second step to check the status of the previous step and if it errored, make the second step fail.

Scott Richardson
0 Kudos
Message 5 of 5
(5,841 Views)