NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate & CustomizeReport Callback

Solved!
Go to solution

Hi All 

When I "Terminate "  a Sequence  in the middle of running  the Sequence stops and Terminate , but the sequence still runs the "CustomizeReport"  Callback and generate a report  . 

How do I prevent  it ?  I don't want to generate a report during Termination .

Thanks 

Benny  

 

0 Kudos
Message 1 of 5
(3,298 Views)

Hi,

 

I found this article that may provide a solution for you: Programmatically Enable or Disable Database Logging or Report Generation

 

You'll need to create a ReportOptions Callback first. Then, in the steps associated with your termination sequence, it looks like you'll need to add a statement step disabling report generation. 

 

Hope this helps.

Kevin S.
Technical Support Engineering
National Instruments
0 Kudos
Message 2 of 5
(3,272 Views)

Hi Kevin S.

 

This Callback is loaded one’s in the beginning of the sequence like “PreUUT” Callback according to the TestSatnd help guide , so if there is “"Terminate " process I cannot change any Statement inside this Callback. 

So this process  is not helpful  to my case.

 

Thank you

Benny

0 Kudos
Message 3 of 5
(3,263 Views)

Good catch.

 

A few routes are covered in this related thread. One would be to simply sort the reports based on status, then delete them programmatically. Alternatively, you could follow the other recommendation and make the UUT Done conditional, though you will run into the problem outlined in this thread where you will end up with empty files.

 

What is the main concern with generating reports for terminated sequences?

Kevin S.
Technical Support Engineering
National Instruments
0 Kudos
Message 4 of 5
(3,257 Views)
Solution
Accepted by topic author bennyk@riscogroup.com

Hi Kevin S.

 

 

My main concern with generating reports in “Terminated” sequences is that it’s  sends a report ( txt file ) to our Production SQL database as “Passed” Tests , if the user  “Terminated” the test before it’s finished and until that event all tests Passed it send a report of  UUT "Passed" to our database , it is wrong and  I want to prevent  sending this UUT to a customer without full testing .  

 

Anyway, I found a solution, in the “CustomizeReport” Callback I found a variable called Parameters.UUTInfo String array ,  one of the leg is a flag that indicate that the UUT “Passed” or “Failed” or “Terminate” in the end of the test  .

 

I am using this flag as a Conditional for generate a report.

 

Thank You for your support.

Benny

0 Kudos
Message 5 of 5
(3,249 Views)