NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically insert sequence call by defined subsequences

Good morning,

 

is it possible, with TestStand 2012, to create a sequence call (automatically) in MainSequence for each defined SubSequence in the same sequence-file?

 

I have many (as more as 120) tests which are applied as a SubSequence. these Subsequences get called from MainSequence. Now I have to set for every SubSequence a sequence call, this take much time.

My idea is to write a script or a helper sequence which do this job for me, is this possible?

 

thanks

Heiko

0 Kudos
Message 1 of 10
(5,004 Views)

Hello,

 

Here is an example...You will probably need to change some little things for your specific sequence file, but it will help you...

 

0 Kudos
Message 2 of 10
(4,985 Views)

You can use this statement instead...(slightly different than the previous one...and more readable according to me)

RunState.SequenceFile.Data.Seq[Locals.index].InsertStep(RunState.Sequence.GetStep(0, StepGroup_Setup), 0, StepGroup_Main)

 

A few explanations :

> Locals.index : local variable to index each subsequence in your sequence file

> InsertStep : method to insert the step you specify into the subsequence (with options in order to specify where you want to insert the step in your subsequence : group, and position in the group)

> GetStep : method to get a reference to the step you need to insert in the subsequence (with options in order to specify which step of your main sequence you want to get a reference to : group, and position in the group)

0 Kudos
Message 3 of 10
(4,978 Views)

Hey Julien,

 

thanks for your answer, but I can't open the file you attached because I use TestStand version 5.0.xxx. Can you save it in a erlier version and post it again?

 

thx

0 Kudos
Message 4 of 10
(4,962 Views)
0 Kudos
Message 5 of 10
(4,949 Views)

Is it OK ???

0 Kudos
Message 6 of 10
(4,914 Views)

Hi Julien,

 

please excuse my late answer, but there's a lot of work for me actual.

 

I can open and run the sequence you sent, many thanks for that.

But it's not really that what I meant. I want to add the subsequences BEFORE I run the sequence file.

In my sequence file I have over a hundred sub-sequences which are defined tests. Now I must add for every sub-sequence a sequence call in my main-sequence.

In the main I need that function you sent which CREATE a sequence call and set it in main-sequence.

 

Is that possible to do?

 

Heiko

0 Kudos
Message 7 of 10
(4,867 Views)

That's not exactly what you need but maybe it will help you.

0 Kudos
Message 8 of 10
(4,842 Views)

Hey Julien,

 

thanks a lot for your help. You are right, not exactly that what I need but I see what you do to copy steps.

If I can use this logic to set a sequence call of a sub-sequence to main-sequence then it will be greatfull.

 

 

Heiko

0 Kudos
Message 9 of 10
(4,781 Views)

Hi !

 

I have the same problem , can you help me please ! I tried to use "InsertStep" but I didn't  success  , do you have any idea thks  you !!

0 Kudos
Message 10 of 10
(3,523 Views)