NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Cause of Sequence Failure

Hi,

Is it possible to change the name of the reported failure during cleanup.

Basically I have a number of tests which may genuinely fail or fail due to a communication timeout.Say I have two tests

  1. Test 1
  2. Test 2

If a timeout occurs on one of these tests I set a flag, on cleanup I check this flag and if true I would like to report "Timeout Failure", rather than "Test 1 Failed"

Thanks & Regards,

Don1.

0 Kudos
Message 1 of 3
(3,244 Views)

Hey Don,

 

This is probably going to be a lot more complicated because you will have subsequences and stuff but what you want to do is change Locals.ResultList[then the step index value].Status = "Timeout Failure".   NOTE: This will not work with on the fly reporting!!

 

The better option here is to include the SequenceFilePostStepFailure callback and change the status in there.  To access the status of that step use: Parameters.Step.Result.Status = "Timeout Failure".  You could have a precondition based on your flag and have your flag be a FileGlobal instead of a Local.  I've included a small simple example to demonstrate this.

 

Hope this helps some,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(3,231 Views)

Doneen,

 

Another idea you might want to consider is to make timeouts an error rather than failure. If you set the error for a step you can set the message for the error as well. In this case you can set it to something like "Communications Timeout Ocurred". Making it an error will cause the execution to go to cleanup by default though so I'm not sure if that's what you want, though for timeouts in many cases that is what makes the most sense.

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(3,213 Views)