12-03-2008 06:30 PM
Hi,
I have programatically generated a TestStand Sequence File. I used C# and the TestStand API. I opened the .seq file in the default TestStand User Interface and the Sequence File runs perfectly.
However, when I created a NewExecution using the Engine object created in the porgram, it seems that the sequence never starts execution. Please look at the following code snippet:
// TSStep and TSSequence was created before
TSSequence.InsertStep(TSStep, 0, StepGroups.StepGroup_Main);
SequenceFile TSSequenceFile = TSEngine.NewSequenceFile();
TSSequenceFile.InsertSequenceEx(0, TSSequence);
TSSequenceFile.Save("SeqGen.seq");Execution TSExecution = TSEngine.NewExecution(TSSequenceFile, "Seq_0", null, false, ExecutionTypeMask.ExecTypeMask_Normal, System.Type.Missing, System.Type.Missing, System.Type.Missing);
while (TSSequenceFile.IsExecuting == true) ; // this flag never changes to false
TSEngine.ReleaseSequenceFileEx(TSSequenceFile, 0);
I know the sequence is not being executed because a COM Server (written as a Local Server in a .EXE) should start when the step within the sequence be executed.
Any ideas why the sequence is not executing properly ?
PacSoft
12-04-2008 02:13 PM - edited 12-04-2008 02:14 PM
Hi Pacsoft,
As far as I can tell, you are making all of the right API calls. Can you verify that you are correctly passing the parameters to the NewExecution method? You could also try passing 0 to the executionTypeMaskParam parameter to get the default behavior. The main things to look out for is that you are passing the Sequence File object, as well as the correct name for the entry point sequence ( referring to "Seq_0" ).
12-08-2008 10:52 AM
Hi, RT4CY,
I finally made it so the COM Server is launched when I call the NewExecution method. However, no steps are being executed. I already tried with different values for the executionTypeMaskParam, but the behavior is the same.
Should not the NewExecution method start executing steps when called ?
PacSoft
12-09-2008 08:44 AM
12-09-2008 10:20 AM
Hi,
I actually found a post in this Discussion Forum where the solution to allow execution is to dequeue UI messages right after the Engine.NewExecution() call. I enable UI Message Polling, dequeue events in a wuile() loop and now the sequence is running gracefuly.
Regards