06-23-2009 05:50 PM
I know you can pause an execution and select a different call stack entry to view other steps outside the currently running sequence. Has anyone found a way to do something similar without pausing the test? I'm open to anything including using an entirely different user interface such as a tree structure.
thanks
06-24-2009 01:51 PM
06-24-2009 06:02 PM
Hi jjssanmina,
If you are looking for steps within a parent or child sequence of the current sequence,you can use the properties within sequenceFile.data.seq, which contains all sequences within a sequence file, to populate a control. You can then use the data within this object to populate a tree or other control with the desired steps. Let me know if this is not what you had in mind, and I'll be happy to help!
06-25-2009 11:35 AM - edited 06-25-2009 11:40 AM
jjssanmina,
It sounds like what you want is a log of all the statuses of steps that have run rather than a display of the currently running sequence. If you are customizing the UI you can do that by using a list control, listview, or textbox instead of the TestStand sequence view control. Then you will need to handle the UIMessageEvent event of the application manager or the engine if you are not using the application manager, and if the UIMessage is a UIMsg_Trace msg, then you can look at the Execution property to find out which execution it's for and the Thread property to get the status of the step that just ran. You can get the status of the step that just ran as follows:
SequenceContext myContext = msg.Thread.GetSequenceContext(0, out frameId);
if (myContext.PreviousStep != null)
{
// Get the name and status from myContext.PreviousStep and put it in the UI somewhere.
}
Also you might want to clear the view or data on the UIMsg_StartExecution msg.
Also if you instead just want to look at the entire callstack structure either at a trace or break uimessage you can follow the Caller property of the sequence context to get the context of the sequence that is calling the current one and just keep recursing until there are no more callers, or use msg.Thread.CallStackSize combined with msg.Thread.GetSequenceContext when handling either a trace or break uimsg. NOTE: It's only safe to access the callstack sequence contexts of a thread while the thread is blocked for the trace or break uimessage.
It's not trivial, but it's doable.
-Doug