NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically change "Record Results" of a step

Hello,
Just wondering whether it is possible to set the "Record Results" properties programatically.
Thanks,
Yannick Willener
0 Kudos
Message 1 of 9
(6,135 Views)
The TestStand API has the following properties to control result collection:

Engine.DisableResults()
Execution.DisableResults()
Sequence.DisableResults()
Step.RecordResult()

Note that TestStand may not honor changes to the sequence and step properties in a running sequence until the sequence completes its current step group.

Also the sequence and step properties actually edit the sequence file.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 9
(6,135 Views)
Is there a way to do the job with a Pre-expression in the step?

Thanks,
Yannick Willener
0 Kudos
Message 3 of 9
(6,135 Views)
The only way to control the step record results is to set the step's property. The step property is only available as a property on the step and you need to access this using ActiveX. This precludes you from using a pre-expression. In addition, the record results setting for the step is acquired before the engine executes each step, so changing it during the execution of the step would not help.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 5 of 9
(6,135 Views)
Yannick,

Are you doing this to save memory or filter results? If the latter, I believe the simplest approach is to use the Result Filtering Expressions.

You can evaluate the step's status expression to something like "Don'tRecord" then set the Result Filtering Expression in the Report Options and/or Database Options dialog to evaluate to false on that condition.

I usually just set the Result Filtering Expression in the report options to evaluate to true on "Passed", "Failed", or "Terminated". For steps that I only want to show up in the report when there is a problem, I'll evaluate to "Done" on success and "Failed" when not.

Howard
Message 4 of 9
(6,135 Views)

Good afternoon Steps fan.

 

I'm digging out this post because i would like to know if Test stand has made any progress concerning the result log capability.

I'm trying to find a way to change on the fly the way the result is recorded.

 

What i basicly would like to do is recording a result only if it fails. I would like to find a way to "Check" on the fly the record result checkbox in the run option properties depending on the result of the step. By playing with the condition it might be possible to get the same result but i do not know how.

 

My second idea would idea would be to have a dummy VI that is executed only if the previous step failed and will log the data.

 

Any ideas ?

0 Kudos
Message 6 of 9
(5,514 Views)

Hi,

 

Why dont you use the SequenceFilePostResultList callback. With this callback you can discard the result if it doesn't match your requirement.

 

Regards
Ray Farmer
0 Kudos
Message 7 of 9
(5,494 Views)

Can you developp a bit. I'm new to Test Satnd and try to evaluate what i can do, and not do. With it ?

 

Thank you

Jc

0 Kudos
Message 8 of 9
(5,464 Views)

Hi Ray - I have been able to get more familliar with TS, doing simple sequence to test and calibrate some analog equipements. I also get familliar with the callback principle by changing on the fly the name of some steps in such a way that they make sense when i read the report.

 

Here is a quick reminder of what i'm trying to do.

 

Execute a Test

If test Fail -> It will show in the report

Else -> Not in the report

 

I'm still trying to accomplish what i described earlier but running into issues. I tried the different approach:

 

1-The only way i managed to do it so far is the next one

setting up the test and manually unchecking the Record Result checkbox

And uf a if() in Test on the PreviousStep object, if the previous step has failed, i redo the test (fortunatly they are very short ) but setup with the RecordResult check box. This approach is working but is not very classy.

 

2-Then i tried to test Step.result.status in the post-Expression field. But according to the reference manual, this expression is evaluated before the Status expression. Dead end

 

3-The i figured i could try to play with the Post Action field by putting Step.RecordResult = (Step.Result.Status == "Failed") as a custom condition.

Once more i get some random result, The prpoerty is set, but since the step has already been executed, it looks like it has already been taken in consideration by the report generator.

 

4-I tried to use a call to the TS engine to change the property of the previous step but i get the same result as 3

 

5-I tried to use SequenceFilePostResultListEntry and then set the property of the step but once more without sucess.

 

What i'm looking for is either a callback that i can overload that is supose to happen after the result of the test has been evaluated but before we notify the engine to log the result. Do you have any other idea ?

 

0 Kudos
Message 9 of 9
(5,236 Views)