10-30-2008 01:47 AM - edited 10-30-2008 01:48 AM
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
Solved! Go to Solution.
10-30-2008 08:38 AM
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,
10-31-2008 09:35 AM
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
10-31-2008 12:51 PM
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,
11-04-2008 02:12 AM
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