NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the step test result in the callback affect the UUT result and how can it be added to the report?

Hello! I have a question need your help.


I use TestStand's built-in Batch Process Model to perform a test seq (Demo. seq in the attachment). We have an MES system, after the seq test completed, I need to read and convert all the contents of TestStand's ResultList into a specific format XML file and upload it to the MES system.


So I added custom TestReport and ReportOptions callbacks in Demo.seq, which will override the TestReport and ReportOptions callbacks in the origin Process Model file  with TestStand.


In the ReportOptions callback, I use:

Parameters.ReportOptions.DisableReportGeneration = True

 to blocked Teststand's own report generation function.


In the TestReport callback, I called my own subsequence (SendReport) to generate a specific format XML file and upload it to the MES system.


The above content can work normally.


However, I encountered an issue where, following this method, when an error occurs in a step of the SendReport that I added, such as an error in generating an XML file or uploading an MES system error, I am unable to receive any error messages from TestStand and there will be no record on the XML report. As long as all steps in MainSequence are PASS, the overall result is PASS, regardless of whether there is a FAIL in SendReport subsequence.


My expectations:
1. The execution result of any step of SendReport affects the final UUT Status
2. All step test data in SendReport can be added to the XML report


Everyone, do you have any good ideas?

0 Kudos
Message 1 of 3
(263 Views)

I recommend a different approach!

 

I guess you don't want to do this for every sequence file you write, so you should look into the concept of process model Plugins.

 

https://www.ni.com/docs/en-US/bundle/teststand/page/process-model-plug-in-architecture.html

 

What you need for yout MES is just another report generation. The standard reports are implemented as a plugin as well. So you can configure your stations to run with no Ni reporting and just use yours.

 

Without bending any flags and stuff. This would be the proper way IMHO.

 

 

0 Kudos
Message 2 of 3
(246 Views)

Hi, Oli_Wachno:

Thank you for your reply!
Indeed, you are right, I do not want to write the same callback on every SEQ file to be tested in this way. However, currently, I know very little about the process model part and have not participated in relevant learning and training. Therefore, although I know what you are saying is correct, I do not know how to implement it.
Could you please provide more detailed information or a simple demo to help me understand this part asap?

Of course, regarding the URL link you provided, I am also actively reading and trying to understand it.

Thank you again for your help. God praises you!

0 Kudos
Message 3 of 3
(234 Views)