NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve Test Step comment from Result List container

Hello,

 

I am looking to retrieve the comment that was in the Test Step of the sequence at the end of the test.  Reason for this is I want to print this comment when the test step fail so that it would be easy to trouble shoot a UUT for the technician.

 

Thanks for any help...

0 Kudos
Message 1 of 6
(3,909 Views)

Hi,

 

The step comment is in the Step property as Step.Result.ReportText. But you will get this comment in the report at the end of the run.

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,888 Views)

Hi,

 

Also, you can access the Comment property more directly if you wish to. However, because Comment is a property of PropertyObject (which Step inherits from), we cannot simply say Step.Comment. You need to first treat the step as a PropertyObject.

 

For example, to get the comment from the previous step, you can say: RunState.PreviousStep.AsPropertyObject.Comment

 

Also, here's a link to the TestStand API Reference Poster. It can be a good resource for learning where to find things in the API.

 

Best Regards,

 

John M

National Instruments
Applications Engineer
0 Kudos
Message 3 of 6
(3,876 Views)

Hi Ray,

 

At the end of the test I could go into the results as Parameters.PrevResultList[some#].ReportText, but there's nothing in the ReportText.  I could also goes to Parameters.PrevResultList[some#].TS.StepName or a bunch of other stuff but no "Comment".

 

Thanks

0 Kudos
Message 4 of 6
(3,848 Views)

Hi,

 

Do you actually pass text from the code module back into teststand?

 

 

 

 

Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,839 Views)

Hi,

 

You didn't say what language you are using but for example see attached LabVIEW Code Module Specify showing how the ReportText is linked.

 

StepSettingsReportText.PNG

Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,837 Views)