08-11-2011 01:51 AM
Hello,
I'am currently building a custom application based on TestStand.
The nominal execution works fine : Start / Stop / Pause / resume / break ...
But when my sequence execution generates an error, i can't get the associated message.
Using UIMsg_AbortingExecution i know that my execution has been aborted ... but Why ?
I have already tried to check the execution.resultString, execution.resultObject ... but with no results : They all indicates that my execution is "PASSED" !
Ex : To generate an error i add a statement in my sequence : This statement contains a non valid expression !
During the execution of this sequence, i can trapp the execution failure, but i would like to have a kind of message like : Bad expression at step statement .... in order to log this message and to view it to the final user.
PS : This kind of error don't generate a ReportError event ! ( In my application, this event is already treated, but don't occurs in this case ! )
Can you help me please ?
Thaks a lot.
Manu.
08-11-2011 02:46 AM
Manu,
the UI message AbortExecution is not the correct place to look for.
The best place i can think of is the callback "SequenceFilePostStepRuntimeError" which is an engine callback. You can do whatever you want/have to do if an error during execution occurs (show a dialog, log to file, repeat step, ....).
I don't get your PS. The only setting where this behavior can occur is if you configure error handling in the station options to "Ignore" runtime errors. This is not suggested. Change it to either "Run Cleanup" (if you have above mentioned callback installed) or "Show Dialog" (Default, if you want to let the user choose).
hope this helps,
Norbert
08-11-2011 02:48 AM
Thanks, i will try ...
Manu
08-11-2011 03:00 AM
Hello,
I just modify the RTEOption and passed it to continue, instead of break.
In this case my execution stops normally at the "bad step".
On my sequence viewer i get a red failed step ... but my sequence execution result remain "PASSED".
How can i force the sequence result to be FAILED in case of a runtime error ?
Manu.
08-11-2011 03:24 AM
Manu,
if you did not check the runtime error behavior in the configuration dialog (Configure >> Station Options >> Execution) and made sure that the behavior is configured to "Ignore", it is expected behavior. So if you do not want this behavior, you have to change this setting as mentioned in my previous post.
Another source for this behavior might be that your step itself is configured to ignore runtime errors. Please select that step, switch to "Run Options" and uncheck the checkbox "Ignore Run-Time Errors".
hope this helps,
Norbert
08-11-2011 03:27 AM
I found what i need ...
By configuring the RteOption to continue ...
the execution stops ... but the result string remains PASSED.
But the exec.errorObject contains an error (My awaited error !!!! )
So at the end of an execution, i have to check first the errorObject, and if no error has occured,
i can have a look to the ResultStatus.
Manu.
08-11-2011 09:27 AM - edited 08-11-2011 09:28 AM
If your execution had a runtime error you can find the details under Execution.ErrorObject.
Edit: Nevermind I see you already figured it out. I didn't read the whole thread.
-Doug