NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access the report information from a pass/fail test?

Solved!
Go to solution

I'm calling some LabVIEW VIs from TestStand that are configured as "Pass/Fail Tests". The Boolean "PASS/FAIL Flag" output from LabVIEW can apparently be accessed through TestStand's RunState.SequenceFailed variable. However, I cannot find a similar TestStand variable that contains the "Report Text" information from LabVIEW. Does such a variable exist, or will I need to create one?

0 Kudos
Message 1 of 4
(3,937 Views)
Solution
Accepted by topic author bmihura

Hi bmihura,

 

The best approach would be to use the direct information from the step itself. You can get the Report Text from the RunState.Step.Result.Report Text

 

That way you access the step's report Text directly.

 

You can also store the report text to a variable in the parameters of the step.

 

Hopefully that gets things moving along for you!

 

Regards,

 

James W.
Applications Engineer
National Instruments
Message 2 of 4
(3,915 Views)

In your case since you are calling a custom VI in PassFail step - the VI should be writing to the following TS variable in case of failure\error.

 

 

Variables that needs update from the VI called :

 

step.Results.Error.Code --- contains code number for that error - shown in error popup

step.Results.Error.Msg  ---- This is the error message for an error popup

step.results.Error.Occured - a boolean when set to true will popup.

 

Step.Result.ReportText  contains the error or failure details. -  this will be recoreded in the reports

 

You will find information in this variables provided the VI that is called is updating it.

 

Hope this helps.

Message 3 of 4
(3,905 Views)

OK, thanks TestStand people. I was making sure that TestStand didn't automatically transfer this information to the main sequence's Cleanup section where I want it, otherewise I'd be duplicating work.

0 Kudos
Message 4 of 4
(3,890 Views)