Add Additional Results Using the TestStand APIs from LabVIEW

Updated Aug 30, 2023

Reported In

Software

  • TestStand
  • LabVIEW

Issue Details

How do I add additional results in LabVIEW using the TestStand API?

Solution

 To add additional results programmatically you can use the TestStand API, refer to the following steps:

  • Using the Sequence Context, you can get a the reference to the current sequence:
  • Using the GetStepByName method you can get a reference to the Step object you specify by name (in this document Test Step):

 

  • Using the Addtional Results and the Custom Results properties and the Insert method, you can add a custom additional result (in this document, we are adding a custom result called "Custom Result" with a value of "Notes - example". You can also specify an expression for example use RunState.Sequence.Main["Test Step"].Result.Status, to log the status of the current step).
  • Finally, close of the all references using the Close Reference Function:

The code (LabVIEW 2019) is provided below:


The resulting report should include your custom result:

 

Additional Information

You can also refer to other approaches as indicated in Adding Custom Data to a Report.