NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i find the reason which has generate a UIMsg_AbortingExecution event ...

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.

Manu.net
0 Kudos
Message 1 of 7
(3,445 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(3,440 Views)

Thanks, i will try ...

 

Manu

Manu.net
0 Kudos
Message 3 of 7
(3,438 Views)

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.

Manu.net
0 Kudos
Message 4 of 7
(3,435 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 7
(3,431 Views)

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.

Manu.net
0 Kudos
Message 6 of 7
(3,430 Views)

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

0 Kudos
Message 7 of 7
(3,420 Views)