NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing TestStand sequence result

I have a test sequence which tests often fails when they are executed for the first time.Failed test should be able to retest immediatelly after failing.I woud like to print only those step results(=test results) which I get when I executed the test for the second time. Is it possible to examine runtime that if same step has been executed before these "old" results would be deleted and replaced whit new results? I triyed this by changing step name (to Failed_Step) after I had executed it for the first time.Before running my test sequence I had defined to this Failed_Step's properties that no result of this step would be printed:
RunState.Sequence.Main["Failed_Step"].TS.NoResult
After this every tests's status in TestStand's report wh
ere "Passed" but anyway the sequence result (=UUT Result) were "Failed". When and where TestStand saves this UUT Results and step's results ? Thanks for your help!
0 Kudos
Message 1 of 3
(4,706 Views)
Hello,

TestStand stores Step results in a Local variable called ResultList, which is an initially empty array of conatiners. After a test step executes, its results are added to the Locals.ResultList array. If you do not want the results of the "first pass" on a step to be recorded, you must delete its entry out of the ResultList array. If you are using TestStand 2.0.x then there is a callback called "PostResultListEntry". You can add code into this callback to delete the entry from the ResultList. All you need to add is a simple expression (i.e. statement step) that will delete the last element out of the array. You will need to add a variable in order to keep track of the number of times the test has failed. If the global informs that this is the f
irst fail on that test step, then delete the element, otherwise do not. This way when the seqeunce is complete, you will have your desired results. I suggest you experiment with the various Engine callbacks to see how they work. You can get access to them by selecting Edit>>Sequence File Callbacks... from within the Sequence Editor.

I hope this helps.
Message 2 of 3
(4,706 Views)
Have you tried loop options?

Goto the Loop Options tab of the test step or Sequence Call step you are using and set the Loop type to Pass/Fail Count. Uncheck the option to record each iteration. Set the status expression criteria to "stop after 1 iterations pass or after a maximum of 2 iterations."

Tip: If you want to refine the status criteria in more detail than what "Pass/Fail count" or "Fixed number of loops" allows, pick the one that is closest to your situation then choose "Custom". All of the equations from the previous selection will be retained and can then be quickly modified.
0 Kudos
Message 3 of 3
(4,706 Views)