NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass/Fail in Report Filename

I would like to display pass/fail in the TS report filename.  Please provide steps or example code of how to perform this task.
0 Kudos
Message 1 of 6
(4,050 Views)
Hi wheatonne,

See here and here.
Test Engineer - CTA
0 Kudos
Message 2 of 6
(4,020 Views)

I was not able to display Pass or Fail as part of the file name using either of the links you provided.  Please provide an example.

Thank you

Neil 

0 Kudos
Message 3 of 6
(3,928 Views)
Neil,

I'm sorry you weren't able to change it via the other steps I recommended. Another option would be to change Locals.ReportFilePath.  This is where TestStand writes the report, and it includes the report name.  You can check to see if your sequence passed or failed by checking the ResultList.  To use the current iteration, you will need to look at Locals.UUT.UUTLoopIndex.  You could also just place the step directly after the MainSequence Callback, and in this case check RunState.PreviousStep.Result.Status. This would all have to be done after the MainSequence Callback but before TestStand writes the report. One caveat is that this will not work with on on the fly reporting.
Test Engineer - CTA
0 Kudos
Message 4 of 6
(3,906 Views)

Hi,

The point to remember is, the file ia actually generated before the call to MainSequence and then the result are written to the file after the return from the client file.

The point which the file path is generated is at a step called 'Determine Report File Path' and this step actually generates an empty file based on the information from the ReportOptions.

Therefore if you want to include the status as part of the filename, you will have to modify the ProcessModel sequencefile by moving the step 'Determine Report File Path'  to a point after the return from 'MainSequence Callback' and before you Write the UUT Report and also modifying the report file name by including the status to Locals.ReportFilePath.

 

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,899 Views)

Just an update:

TestStand 4.2 gives you the ability to specify the report path using Expressions as well right from the Report Options dialog box. For instance, using the  

<UUTStatus> macro, you could specify that reports for UUTs that Pass versus those that Fail go to different locations.

For more information on this, refer to:
NI TestStand Help: Specifying Report File Paths by Expression
NI TestStand 4.2 Release Notes: Using Expressions to Customize Report File Paths

 

For more information on the new features in TestStand 4.2, refer to:
Whats New in TestStand 4.2

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 6 of 6
(3,519 Views)