11-25-2009 07:37 AM
Hi,
Does any one know how to get whether execution is terminated Interactive from the Execution object.
Coding is doing in c#.net
Regards
Ceaser
Solved! Go to Solution.
11-25-2009 08:39 AM - edited 11-25-2009 08:46 AM
Ceaser,
you should use the UI message EndExecution in order to determine if an execution is finished.
hope this helps,
Norbert
[Edit] Please note that this UI message is also sent for the frontend sequences (login/logout) so maybe you have to filter this in your UI
11-25-2009 10:56 PM
Thanks for the reply,
I have handled EndExecution but it is always give the state as ExecTermState_Terminating even if the execution ended as ExecTermState_TerminatingInteractive
Is there anything i am missing in this logic?
Regards
Ceaser
11-26-2009 02:14 AM
Ceaser,
i currently have no UI capable to capture arbitrary UI messages and to create interactive executions, so i cannot check if this is a desired behavior.
I just want to ask:
Are you really creating an interactive execution (execution without process model, possibly created by selecting several steps and select "Run Selected Steps" in the context menu)?
Norbert
11-26-2009 02:32 AM
Thanks for the reply,
I am creating interactive execution as you explained.
step 1 putt a break on a step
step 2 from context menu select Run selected step.
step 3 Execution start and halt, due to break, now terminate execution.
Also if the execution ended normally, checks the error if any using
if (ExtnViewMgr.Execution.ResultObject.GetValBoolean("Error.Occurred", 0x00) == true)
{
status = "Error - " + ExtnViewMgr.Execution.ResultObject.GetValString("Error.Msg", 0x00);
}
else
{
status = ExtnViewMgr.Execution.ResultStatus;
}
Can we find like this if the exxecution is terminated?
Regards,
Ceaser
11-26-2009 07:09 AM
Ah, ok, now we are getting closer.....
So you want to know if an interactive execution has been terminated.
Now here is the trick:
All information you'll need is sent automatically by TestStand using UI messages. Here the list of messages you need:
1.) UIMsg_TerminatingInteractiveExecution–(Value: 15) TestStand sends this message just before terminating an interactive execution. The interactive execution does not actually terminate until the UIMessage is released.
This message will inform you about two things in parallel: a) it is an interactive execution (otherwise it would be the UIMsg_TerminatingExecution–(Value: 5)) and b) the termination process is currently taking place.
2.) UIMsg_EndExecution–(Value: 😎 TestStand sends this message after an execution completes. The user interface must update its display accordingly.
This message is used in order to know that the execution is really finished regardless of its result.
Only if you receive both messages in the stated order (1=>2) you know that the interactive execution has been terminated and is not running anymore.
hope this helps,
Norbert
12-04-2009 02:57 AM
Thanks for the reply Norbert
I have found a property
ExtnViewMgr.Execution.InInteractiveMode
which is true if terminated interactively else false.
Regards,
Ceaser