NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to repeat one test sequence step?

Hi,

 

You can discard the failed result in the SequenceFileStepFailure callback sequence then perform a repeat test. That way you will only get the one result ResultList.

 

Regards

Ray Farmer 

Regards
Ray Farmer
0 Kudos
Message 11 of 13
(1,523 Views)

Hello,

I have a situation where I have 5 tests to be done on a perticular data channel, and I have 15 such channels in my unit under test with the same limits and parameters, so there are 75 steps in total. What i've done is i've created a sub sequence of the 5 tests and calling it for all 15 channels. I want to repeat a perticular step (not all the 5 tests but only one test of a perticular channel) if it fails for 3 times and declare pass only if it passes for all the three times. Is there any way in which I could accomplish this? Thank you

 

Lakshmi Narasimha
0 Kudos
Message 12 of 13
(1,170 Views)

Hello Lnsimha93,

A solution would be the following. For each of the 5 steps in the subsequence:

  • Go to the Step Properties
  • Select the Looping tab
  • Choose Loop Type: Custom
  • Configure the following expressions:
    • Loop Initialization Expression: RunState.LoopIndex = 0
    • Loop Increment Expression: RunState.LoopIndex += 1
    • Loop While Expression: (RunState.LoopIndex==0) || (RunState.LoopIndex > RunState.LoopNumPassed ) && (RunState.LoopIndex< 4)
    • Loop Status Expression: RunState.LoopNumFailed< 2 ? "Passed" : "Failed" 

I also attached a small demo.

  • Test 1 passes.
  • Test 2 fails initially. This triggers 3 repetitions of Test 2, which are all successful. (=> Passed)
  • Test 3 fails as well. The first repetition is unsuccessful, and the last two are successful. (=> Failed)

The final result is Failed.

 

This should accomplish your desired task. Please let us know if you have any other questions.

 

Message 13 of 13
(1,149 Views)