From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
MimiKLM

Feature proposal: in "On Run-Time Error" combo box in Execution tab in Station option one option shall be added

Status: New

Right now in "On Run-Time Error" combo box in Execution tab in Station option we have the option as below:

 

Untitled222.png

 

I think another one shall be added which would be Retry. At some ocassions, it'd be good if TestStand, in case of an error, could retry to execute the step for second - or even third or forth - time, by default.

7 Comments
warren_scott
Active Participant

I completely agree with the idea of being able to automatically retry items on error (or failure too!).  I have even implemented something like that in our custom process model.  The problem is that it is not as simple as just a station option, because some steps it is appropriate to retry on error (or failure), and others you do NOT -- so it is very step specific, and you need to also be able to configure which steps get retried, and which steps don't.  And then whether this step is allowed 3 retries, and the other step is allowed 5.  Then we got to the complication of retrying some steps worked just fine as retrying just that step, but others required to retry the last 3 steps to properly recover from the error.  I'm totally in favor of trying to get a better error/failure retry system that doesn't take so much brute coding (either conditional step looping or brute custom postaction gotos everywhere), but it's got to be more full-featured than just one station configuration flag.

dug9000
NI Employee (retired)

What if it was a per-step setting (just brainstorming, not promising anything). You could have something like:

 

x Retry on Error

x Retry on Failure

Maximum number of retries [  3 ]

 

If multiple steps were involved you could put them in a subsequence and set the retry settings on the sequence call. Also, would you ever need to know which retry you were on (i.e. would that need to be exposed as a teststand variable somewhere)?

Elaine_R.
Active Participant

i suspect that any built-in solution is going to open a can of worms, since retries are usually related to error handlers which are somewhat test system dependent, but maybe just adding some hooks into the existing step looping property might do the trick for the minimal usecase?

 

having the retry count then could be stored in the loopcount the same as it is done currently for looping steps, and would propigate to reports... mostly we just need an easy loop on error feature to go along with our loop on pass/fail

dug9000
NI Employee (retired)

Actually, what Elaine said above made me realize you can probably already do this on a per step basis with custom loop settings.

MimiKLM
Active Participant

Sorry for the delay in the answer.

 

I was aware that If I customise the looping option in step I can achieve the auto retrigger the test.

 

However, I was thinking about global settings for all steps. 

04RC51
Member

I'd be much in agreement with having a per-step retry for handling errors.  What I've really love to see is something along the lines of an "On Error" setting in addition to the "On Pass" and "On Fail" selections on the step settings Post Actions tab, with similar selection options (i.e. Goto Step, Call Sequence, Terminate Execution, Break,...), ideally in combination with a Retry or Looping option.  In my test system, I often can't handle errors solely within the module being called, but could easily handle them at the system level with either a simple retry or by calling a sequence and then retrying.  Although I could alter the process model to do something similar, the proposed solution would allow me to quickly and easily customize the errorhandling on a per-step basis.

MimiKLM
Active Participant

@04RC51.

 

Very good comment, thank you. I'd still want to have the opportunity to set it up per test/station, but your proposal is significatnt.

 

I agree with you at: 

 

(...) often can't handle errors solely within the module being called, but could easily handle them at the system level with either a simple retry or by calling a sequence and then retrying.  (...)

 

Some time ago I posted another idea about the post-actions. See this: http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Add-to-the-post-actions-on-fail-a-Fail-execution-... It shoulb be extended by your thoughts.

 

Take care!