05-07-2010 02:43 AM
05-07-2010 10:37 AM
"I want the execution to ignore errors and continue, but the UUT status should be ERROR even if one of the step has a status error. "
Why do you want to continue and ignore errors? Plus since you want to display ERROR as the final UUT Result, why bothering continuing with the test if an error occurs.... Won't the test simply not work properly if any errors occur in previous steps? Why not set the Station Options to "Run Cleanup" on Run-time error?
Thanks,
Paul
05-09-2010 06:16 PM
HI Paul,
Thanks for your reply. The product we are testing is in a very early stage of development. If we are going to run cleanup after an error, most of the sequences will not run till the end, as we are expecting lots of errors at this stage. Once the product is mature, definitely we will run cleanup after an error. I know Teststand treats all the errors as critical run time errors. In our cases, the errors appear because the product is not responding now, the way we want. Currently the report says FAILED when an error occurs. We could not differentiate from an actual failure from error unless we go deep digging into the report. I was looking for a way we set UUT status to ERROR in SequenceFilePostStepRuntimeError callback.
05-10-2010 09:38 PM
What do you mean "most of the sequences will not run till the end?" Do you mean to say that you expect that you will encounter errors in the early steps of a sequence, and as a result, will not be able to execute the rest of the sequence?
One way to overcome this scenario is to contemplate some error handling. Where exactly do these errors originate from? Are they in some code modules? If so, what is the environment for these code modules? Perhaps you could consider processing the output from these code modules to detect the errors and appropriately display the errors before the step fails.
05-10-2010 10:01 PM
Raj,
Thanks for your reply. You are right, Error handling is another way to fix this issue. In my case, it is not a permanent fix. As the product reaches a more mature stage, these errors cannot be ignored, it must be reported and i may have to handle the errors differently during different stage of the development. I managed to modify the process model to fix this issue. After my main Sequence callback, i go thro the results, if i find any error, i change the the locals and runstate variables as decribed below
RunState.Sequence.Main["MainSequence Callback"].Result.Status="Error",
RunState.Sequence.Main["MainSequence Callback"].Result.Error=Locals.ResultList[0].TS.SequenceCall.ResultList[RunState.PreviousStep.Offset].Error,
Locals.ResultList[0].Status= "Error", Locals.ResultList[0].Error=Locals.ResultList[0].TS.SequenceCall.ResultList[RunState.PreviousStep.Offset].Error,
Locals.ResultList[0].TS.SequenceCall.Status="Error"
This gets me a step status "Error" in the report even if i ignore the error in my station options. I am sure there might be a better way to do this. Currently this works for me..