NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

remove teststep from result list

Under some conditions we want to remove a teststep from the resultlist. Because we cannot decide to discard that result immediately after that that step , we cannot use Parameter.DiscardResult in PostResultListEntry callback.The step should cause a sequence failure if it fails and if it is not removed. But  when it failed and  you just remove it with RemoveElements() from the ResulList later, the sequence result will not change from FAILED to PASSED. What is the proper way in Teststand to fixup the Sequence result under such conditions ?
0 Kudos
Message 1 of 4
(3,446 Views)

Hi Markus,

You can try resetting ResultList[index].TS.StepCausedSequenceFailure or find ResultList[index].SequenceCall.Status and set this equal to "Passed"

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,442 Views)

Sorry, that doesn't seem to work. I'am attaching a sequence, which  changes both resultlist[index].status and resultlist[index].TS.StepCausedSequenceFailure and  then removes that step. But the the final result of the sequence  doesn't change( it is still FAILED). 

0 Kudos
Message 3 of 4
(3,417 Views)

Markus,

RunState.SequenceFailed = False will cause the MainSequence to be recorded as "Passed". 

The following only needs to be done when returning from a SubSequence to the Caller, so you can remove that expression.

Locals.ResultList[0].TS.StepCausedSequenceFailure = False

Regards

Ray Farmer

 

Regards
Ray Farmer
0 Kudos
Message 4 of 4
(3,406 Views)