NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Step status, number of steps and result container

Hi All.

I have several problems with my OI.

1. I am using my own execution viewer, its build up on UIMessages, that is executed from my custom step types as a poststeprun. The problem is that when poststeprun is executed then the status expression is not executed. I can see one solution, that is to evaluate the status myself in the routine that writes to the OI. I think this is not a good solution, because it takes time, and status expression will do exactly the same afterwards. So any other ideas ?

2. Is there any way that I can count how many steps there is in my seq, this number should be used to "count down" in a progressbar on the OI.

3. How do I "enable" more variables to be included in the result container, I have my own "test result container" that I want to be included in the normal result cluster, so I afterwards can get the results in the processmodel. I tried to build something in SeqFilePostStep, but the problem is that this is called after every step... so you need a lot of controlling to take care of while and for loops.....
0 Kudos
Message 1 of 2
(2,850 Views)

Hi,

  Due to the execution order within a step's execution a post step substep will be called directly after the code module itself has run.

You could evaluate the status as part of the step if you wanted, or you could move to using a post step callback in the sequence, then you could get a handle to the step, and in theory (I've not tried this) use the step's adapter to get to the adapter API and find out the path to a custom substep (rather than a post step substep) and run this, thus giving you a generic method of calling into the step after the status is resolved.

Counting the number of steps in a sequence is part of the sequence object (such as runstate.sequence) where you can call a method (use an activex/COM adapter to call an action step) and call the method GetNumSteps (this is based per step group, so run it out 3 times)

There are a few methods of including more variables into the resultlist - try looking at the AddExtraResult method of the Execution object, used in the process model sequencefile (from the sequential model, go to the test uuts entry point, and open the sequence call setup result settings (8 or so down in the main step group). That calls into the ModelSupport.seq and the Setup Result Settings sequence. In there are two pre-conditioned action steps that say if there is a property of the step called "x" then add it to the step result element in the resultlist array and call it "res x".

Hope that helps

Thanks

Sacha

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(2,629 Views)