01-07-2019 07:50 AM
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
Solved! Go to Solution.
01-08-2019 12:26 PM - edited 01-08-2019 12:27 PM
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.
01-09-2019 12:51 AM
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
01-09-2019 12:26 PM
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?
01-10-2019 01:02 AM
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