NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I get all test steps at the end of test sequence?

At the end of my test sequence I need to access all steps from test, I need for each failed step, step name, step status (passed/failed), step limits (high/low) and measured value in step. This information is needed for exporting in VB dll and for generating log file. Can anybody give me an idea or suggestion (example) for retrieving this information?
0 Kudos
Message 1 of 2
(2,991 Views)
Hmmmm

If I were you I wouldn�t wait until the end of the sequence to get all that information. It might be a lot easier to pick it up along the way!

Certainly, if you had to, you could go to the end of your Main sequence (or maybe in the Cleanup stepgroup) and build a quick loop with a Goto statement, and access your Locals.ResultList array, and pick through every element in it for the stuff you�re looking for. Better still would be if you could pass the whole array into VB and parse it all out on that end, but that�s a lot of work too.

A better approach that comes to mind, is what if you were to leverage some sort of TestStand Engine Callback? What about a SequenceFilePostStep callback? Or a SequenceFilePostResultListEntry callback? That way, after every step in your sequence is run, this second sequence will quickly run (stealth sequence!) and you can collect info about just the one step, and append it into some Locals.StepNameArray of strings or similar storage space.

By the end of your sequence you�ll have gathered up all the information you need and can simply add your DLL call and walk away.

If you�re going to go the callback approach, preconditions that test for existence of a property will be very handy. For example, �If there are Limits, then copy them to my array of useful info� Since not every step has limits, only the ones that do will execute that particular step. Check out the function PropertyExists(�Parameters.Result.Limits�), it can be handy! If you�ve never used these callbacks a little research into the shipping examples is definitely in order but learning about them is well worth the effort.

Keep in mind that you�re basically re-creating the Locals.ResultList array, but on the other hand, doing it manually will allow you to pick and choose the data you want, and put it in whatever structure you want.

by-the-way, do you have more than one sequence in your file? Do you call subsequences? These could add a layer of complication. In either case working with the Locals.ResultList might start looking more tempting.

Cheers,

Elaine R.
www.bloomy.com
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 2 of 2
(2,991 Views)