NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Save Report in Directory created during Test execution

Hello TestStand Experts,


Based on documentation and previous support I am able to save test report using expressions in a specific directory, albeit from the previous test run, that I create during execution using the ReportOptions Callback sequence using the following expressions:

 

Parameters.ReportOptions.DisableReportGeneration = False,
Parameters.ReportOptions.IncludeStepResults = True,
Parameters.ReportOptions.AppendToFileIfItExists = False,
Parameters.ReportOptions.Format = "html",
Parameters.ReportOptions.BodyGenerator = "Sequence",
Parameters.ReportOptions.BaseName = "",
Parameters.ReportOptions.DirectoryType = "SpecifyByExpression",
Parameters.ReportOptions.ReportFileSequentialModelExpression = "StationGlobals.target_directory_full_path+\"\\\\TEST_Report.html\"",
Parameters.ReportOptions.GeneratePath = True,
Parameters.ReportOptions.IncludeTimes = False

 

 

StationGlobals.target_directory_full_path variable stores the path which is based on steps executed in the Cleanup() of the MainSequence().

I noticed that the ReportOptions sequence is executed at the beginning of the test execution and therefore whatever value is stored in the StationGlobals.target_directory_full_path variable, from the previous test run, gets assigned to the Parameters.ReportOptions.ReportFileSequentialModelExpression and the report accordingly gets stored therein wrongly.

Is there a way to force the ReportOptions sequence to run at the end of the test execution, after all steps in Cleanup() have been executed, or any other way to save the report in the StationGlobals.target_directory_full_path based on the current test run?

 

Thank you.

P.S. I am a complete new user of TestStand and am learning by executing project handed over to me without support. Since we are in middle of testing, getting proper training to get started and "playing time" with the Software is difficult so please bare with me if my question is framed inappropriately.

0 Kudos
Message 1 of 1
(563 Views)