NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Sequence directly after loading the sequences

Solved!
Go to solution

Hi,

 

I'm planning to write some kind of profiler to find out which step consums the most testtime.

Therefore I'm using the Engine Callbacks SequenceFilePreStep and SequenceFilePostStep.

Whenever a Step in the sequence is executed the SequenceFilePreStep generates a timestamp and after the execution of the step the SequenceFilePostStep generates another timestamp. Both timestamps can be used to estimate how long that step was executed.

 

I'm using many different sequence files (e.g. one sequence fiel for feature A another sequence file for feature B and so on).

A sequence file can be called (loaded) from both the top level sequence file or from any other sequence file.

 

My problem is, that I don't want to modify each of the sequence files. The profiling should rather be initited automatically.

My idea is, that the process model will add the above mentioned subsequences into every sequence file that is used during execution of the testplan.

Any Idea how to implement that?  As far as I have seen there is no ProcessModel callback which is called whenever a sequence file is loaded, isn't it?

 

Many Thanks,

Thorsten

 

I forgot to mention, I'm using Teststand 3.1 currently, but planning to change to 4.x

 

Message Edited by Tho_Wa on 10-30-2008 01:48 AM
0 Kudos
Message 1 of 5
(3,469 Views)

Hi Thorsten,

 

That would be a great product suggestion- StationFileLoad callback.  So in the TestStand Reference Manual in Chapter 10 there is an awesome table that shows all the Engine Callbacks (table 10-1).  It shows where the callbacks should be used and what not.  Basically the ProcessModelPreStep and ProcessModelPostStep might be what you are looking for.  You'll Notice that it states: Before the engine executes each step in any client sequence file that the process model calls, and each step in any resulting subsequence calls.

 

So why not just use these?  The step is being passed as a parameter so you have access to it.

 

Let me know if you have any questions,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,456 Views)

Hi jigg,

 

sounds like a good idea.

But the I would need to distinguish, if the calling step is part of the process mode or part of any testplan sequence file?

 

BR Thorsten

0 Kudos
Message 3 of 5
(3,444 Views)
Solution
Accepted by topic author Tho_Wa

No you wouldn't!  Read the description carefully.  Also, I tested it by adding to the process model.  You can do the same and just put a simple message popup in there.  The message popup will only fire once for every step in your Client Sequence.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(3,440 Views)

Hi jigg,

 

you are absolutely right. It works that way that the engine callback will be executed for steps in every sequence other than the processmodel itself.

 

I was somehow irritated because our processmodel calls subsequences itself before the testplan sequence file is executed.

Further during execution of the processmodel the engine callbacks have been set to disable, so that they weren't executed from the testplan file.

 

But finally I have got it working...

 

Thanks, Thorsten

 

0 Kudos
Message 5 of 5
(3,419 Views)