NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Report Path and Operator Field in Reports

Dear all,

I have a question regarding TestStand and couldn’t find a clear answer in the forums.

I would like to define two string variables in the Locals or Parameters of the sequence and use them within the “Specify Report File Path by Expression” option to dynamically generate the report path.

Is this supported, and if so, what would be the correct syntax?

 

Additionally, I would like to override the “Operator” field in the generated report with a custom string defined during the sequence execution.

Is there a way to assign this programmatically within the sequence?

 

Thank you in advance for your support.

Best regards,

0 Kudos
Message 1 of 4
(505 Views)

The report path normally has to be decided ahead of MainSequence actually being called. So as long as you have that in mind, you can override callbacks like ReportOptions, or PreUUT to modify the expression (Parameters.ReportOptions.ReportFileSequentialModelExpression" if using Sequential Model for example).

 

For changing the "Operator" field you can override PreUUT, and call Parameters.ModelData.StationInfo.LoginName = "NewOperatorName"

0 Kudos
Message 2 of 4
(485 Views)

Hello,

Regarding the operator field, I managed to override it by modifying the variable:

StationGlobals.TS.CurrentUser.LoginName= "User001"

However, the change is only reflected in the UUT report on the second execution, not immediately.

As for the report save directory, I haven’t found a solution yet. In the variables I can set, I don’t see the one you mentioned.
When I try to insert a statement to modify the variable, the sequence errors out — both for the save path and for the user.

Thanks for your help and any further suggestions.

0 Kudos
Message 3 of 4
(301 Views)

Hi,

 

I am also trying to dynamically set the report path since for me it changes based on the SW version that I am testing. The ReportOption callback is run before I can read in the SW version (1st line of Setup in main sequence) so the FileGlobals that I set to update the fields are empty.

 

If I set a breakpoint on the test step and set them manually then the report is generated in the dir I want so I know that the expression I added to the callback is correct. Now all I have to figure out is how to get the FileGlobals set before the callback.

 

If I find a solution then I will let you know and please let me know as well.

 

Thanks

Randy

0 Kudos
Message 4 of 4
(291 Views)