NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand error handling Option

Solved!
Go to solution

Hi all,

  I am looking for a way that when a step get error,  Sequence will not be terminated but continue to run other steps.

I found no error handle option to fit my need as the below.   Value 1 seems to be good but it terminated the sequence.  Value 2 sumary test result validate as good which is not useful.  is there any way I can change the error handle structure?

 

  • RTEOption_Abort–(Value: 3) Instructs the execution to abort the execution.
  • RTEOption_Continue–(Value: 1) Instructs the execution to process the error by propagating the error to the calling sequence, if one exists. If the current step group is Setup or Main, the execution jumps directly to the Cleanup step group.
  • RTEOption_Ignore–(Value: 2) Instructs the execution to ignore the error and continue normal execution.
  • RTEOption_Retry–(Value: 4) Instructs the execution to ignore the error and re-execute the step that caused the error condition. For the StationOptions.RTEOption property, the Execution.RTEOptionForThisExecution property, and the Thread.SetBatchRTEOption method, TestStand interprets the RTEOption_Retry value as RTEOption_Continue.
  • RTEOption_ShowDialog–(Value: 0) Instructs the execution to launch the Run-Time Error dialog box when an error occurs.

Purpose

0 Kudos
Message 1 of 17
(10,080 Views)

You could use the SequenceFilePostStepRuntimeError callback and handle errors if you need to do something custom.

 

An example ships with Teststand which will give you some pointers.

http://zone.ni.com/reference/en-XX/help/370052K-01/tssuppref/infotopics/callbacks_sequencefilepostst...


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 17
(10,069 Views)

Do you have example in teststand 2010?I don't see the same in 2010

0 Kudos
Message 3 of 17
(10,057 Views)

Hello,

I check out the SequenceFilePoststepRuntimeError, It may allow to do some change to the Error Structure but not the RTE handle.

I might be able to discard the errror and change it to failed.  Nut that is not my intention.  May be I am not asking correctly.

Let me ask again.

Is there anyway to insesrt another setting option to the RTE setting in the "Station Option" to accept the error and continue to run the nextstep without terminated?

Tphan

0 Kudos
Message 4 of 17
(10,049 Views)

So you want the status for the execution to be error, but you want to keep running all of the steps in the sequence? Please explain this use case in more detail if possible.

 

Thanks,

-Doug

0 Kudos
Message 5 of 17
(10,036 Views)

Hello,

I come down to a simpler requirement that tight to the test report

I need to implement process as follow:

-If a step failed, it will skip the remaining steps if sellect to but will report them as skip  for each remaining step and sumary test result as failed.  Failed step will be logging al the the failed data. If "skip" is not allow,  it will run each remaining step as normal

-If a step get error, it will skip the remaining step, it will skip the remaining steps if sellect to but will report them as skip  for each remaining step and sumary test result as Error.  Error step will be logging al the the failed data. If "skip" is not allow,  it will run each remaining step as normal

Thanks

Tphan

0 Kudos
Message 6 of 17
(10,028 Views)

You may be able to find the error handler example at this location instead: <TestStand Public>\Examples\Callbacks\PostStepRuntimeErrorCallback\ErrorHandlerExample.seq. This example goes into detail on how to manage Run Time errors using different cases. You should be able to modify individual cases to meet your requirements.

 

Regards,

 

-Travis E

 

National Instruments
Product Marketer
0 Kudos
Message 7 of 17
(10,005 Views)

Hello

I did found the example.  But these are POST (error) callback.  So by the time is come to the Post.  It has already either terminated or ignored.  Which is no help at all

Thanks for answer

Tphan

0 Kudos
Message 8 of 17
(10,000 Views)

Hello Tphan,

 

The function is Post Step, not Post error. When an error occurs from a step the callback is immediately executed and gives you an option to run code. In the example the callback code is a case statement, did you encounter a situation running the example that calls this functionality into question?

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 9 of 17
(9,979 Views)
Solution
Accepted by topic author Tphan

Take a look at the example:

 

<TestStandPublic>\Examples\Callbacks\PostStepRuntimeErrorCallback\ErrorHandlerExample.seq

 

Look at the sequence SequenceFilePostStepRuntimeError for various things you can do inside this callback.

 

Hope this helps,

-Doug

0 Kudos
Message 10 of 17
(9,975 Views)