Hi,
TestStand 2.0.1f1
Attached is a SequentialModel.seq that will run selected steps in a new execution using the process model. (It started life based on the inital
demo example)
When either Test UUT's or Single Pass is selected a check is made to determine if there is an initial selection.
If there isn't then the normal Test UUT's or Single Pass sequence is run.
If there is then a new sequence file is created with a new MainSequence. The selected steps are cloned and inserted to the new MainSequence. Also
the Setup and Cleanup groups are also cloned. Likewise the FileGlobal Defaults are copied to the FileGlobals of the new Sequencefile and also the
Locals.
Any Sequences contained in the SequenceFile are cloned to the new sequencefile (except the MainSequence, SequenceFileLoad and SequenceFileUnLoad).
In addition, as the Steps are cloned any break point are also set in the new sequence file.
The new sequence file is executed in a new execution using the process model entry point with the break on first step controlled from the menu
option.
One thing I am assuming is that there is only one element in the RunState.InitialSelection.SelectedSequences array.
Question: Under what circumstances will there be more than one selected sequence?
I had one problem, I tried my SequentialModel.seq with the demo auto.seq. This contains the SequenceFileLoad and SequenceFileUnload.
When I run this demo with a few steps selected, it run ok but when I closed the results window the UnloadFile callback was executed.
I found an option that can be set with the Engine.ReleaseSequenceFileEx which should have stopped the UnloadFile callback from running. But it
made no difference.
I then came across SequenceFile.UnloadCallbackEnabled() and using this function it did disable the Unload callback and this worked.
Question: So, Why didn't setting the Option in the Engine.ReleaseSequenceFileEx work?
Limitation using this SequentialModel.seq,
1) Any precondition to a step's execution based on the result of an early steps are not check when cloning the selected steps. Therefore this has
to be done manually when making the selection.
2) All Sequences in the SequenceFile are cloned to the new sequencfile. (May not be a problem when SequenceFile contains only a few sequences.)
3) The selections are limited to the MainSequence. If steps are selected in a Subsequence then these would be copied to a new MainSequence and
this would be run. Providing this doesn't require any parameters passed from the original caller then this should still run. The problem will
arise if parameters are required.
4) This is not really a limitation - If a full run of the SequenceFile using Test UUT's or Single Pass is required then the user must ensure no
steps are selected.
What I whould like to happen is the ability to make a selection in SubSequence calls either one or two levels down from the MainSequence. The new
execution setup would contain those steps in the MainSequence that are required to call those selected steps in the lower levels.
Would welcome any comments on my SequentialModel.seq attached and answers to my questions.
Regards
Ray Farmer
Regards
Ray Farmer
