NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining failing step name inside a SequenceCall if result reporting is disabled

I'm facing a problem that a SequenceCall step sometimes fails during testing. This sequence contains 100+ subsequences and different steps. The customer wants that most of the steps have their result reporting disabled so the test report wont be too cluttered. The culprit that causes the whole upper level sequence to fail must be some of the steps that has result reporting disabled.

So the question is that is there a way to find out the step name what caused the SequenceCall to fail? I wouldn't want to turn on every steps result reporting just to find out what sometimes causes the problem because I'm not able to run the test sequence myself as I don't have the required test setup at my disposal.

I'm using TS2014

0 Kudos
Message 1 of 3
(3,262 Views)

I would add the SequenceFilePostStepFailure callback to your sequence.  When in this callback, Parameters.Step.Name will give you the name of the failing step.  You can put it in a FileGlobal and use it in other parts of the sequence, such as PostUUT.

 

Pulido Technologies LLC

0 Kudos
Message 2 of 3
(3,248 Views)

Thanks for the advice. That would work nicely also, but I'm not 100% sure if the customer wants us to mess with the callbacks. So I decided just to use 'For Each'-loop to iterate over RunState.Sequence.Main inside the failing sequence and then just add the step name to a string parameter to bring back to the main sequence 'RunState.Sequence.Main[Locals.StepID].Result.Status == "Failed" && RunState.Sequence.Main[Locals.StepID].CausedSequenceFailure? Parameters.FailedSteps = Parameters.FailedSteps + "; " + RunState.Sequence.Main[Locals.StepID].name : True'.

0 Kudos
Message 3 of 3
(3,226 Views)