NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling APIs and sequences from Expressions Tab in NI teststand

Hi,

I am using CVI adapter in NI teststand. My requirement is to generate a report that contains both failed and pass test results. The failed test cases should contain the error code and the error description with the step name. Once a step fails the next step is to be executed in a sequence. Every step calls a CVI api and has a return value to indicate the error code. I want to use this return value and get the error description and then call a sequence to write to a .txt file. My plan is to check for the return value of a step and then get the error description and also call a sequence from post expression tab. Kindly, suggest me the procedure to go ahead.

0 Kudos
Message 1 of 2
(2,907 Views)

Hi Vicky,

 

The functionality you describe sounds like the reporting functionality already implemented in TestStand.  A good article describing TestStand's reporting capabilities is included in the TestStand Advanced Architecture Series:

 

Best Practices for NI TestStand Report Generation and Customization

 

Addressing the requirement of reporting errors, each step contains an error property, which you can populate with your code module's error information.  To do this, populate the Step.Result.Error container using the output from your function, for example:

 

1.png

 

Note that the error will not be recognized by TestStand unless the Step.Result.Error.Occurred is True.

 

I hope this will help you get started!  Let me know if there is anything else I can do to help.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 2
(2,745 Views)