04-24-2023 10:22 AM
My testing shows the variable updates correctly and that I end up with a file named "Report_Passed.xml" in the correct folder.
04-25-2023 01:37 AM
@ee-jallen wrote:
- What process model are you using? -> Sequential and Batch model
- Are you starting the test with the process model? -> start as SinglePass
- Have you put a breakpoint in ReportOptions callback to verify that the variable updates? -> Yes it updates
- Are using a Statement expression step to update the variable?
My testing shows the variable updates correctly and that I end up with a file named "Report_Passed.xml" in the correct folder.
in the reportoptions callback I am using this expressions:
Parameters.ReportOptions.ReportFileSequentialModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BaseName + "_$(UUTStatus).$(FileExtension)" + "\"",
Parameters.ReportOptions.ReportFileBatchModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BatchBaseName + "_$(UUTStatus).$(FileExtension)" + "\"",
Parameters.ReportOptions.ReportFileParallelModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BaseName + "_$(UUTStatus).$(FileExtension)" + "\"",
Parameters.ReportOptions.BatchFileBatchModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BaseName + "_$(UUTStatus).$(FileExtension)" + "\"",
When setting a breakpoint I see that those variables are updated with the correct path like this:
...MainReport_$(UUTStatus).$(FileExtension)
The generated report name comes like this at the end:
.. [25 04 2023].xml.html
So the Basename is correct with the date but it somehow ignores the $(UUTStatus) completely.
04-25-2023 10:57 AM
You can't put UUTStatus in the Batch report name:
Parameters.ReportOptions.BatchFileBatchModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BaseName + "_$(UUTStatus).$(FileExtension)" + "\""
Reports can have UUTStatus but Batch Report cannot; and that makes sense because the batch report contains all of the statuses of the sockets being tested.
You would know this if you used the GUI to set the expressions for your reports, the macro is missing from the list.
I still don't understand why you are needing to set expressions during runtime. Why not just set the expressions in the Report Options? It would guarantee that you don't make any mistakes.
04-26-2023 01:55 AM
I can not use the GUI because I need to set the path during runtime.
Anyway, thank you for the solution which I fully understand now!