09-29-2011 06:17 AM
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.
11-03-2011 04:31 PM
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:
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.