Add Repair report (UUR) dynamically from TestStand


When a Unit fails in the test, sometimes the operator know the cause and it would be a good idea to allow them to add a Unit Under Repair (UUR) report on the fly and link it to the Failed UUT (test) report.

The WATS API or the WATS_Teststand_Support.dll allow you to make UUR reports programmatically from TestStand.
There are 2 main options for this:
1: Use the LabVIEW toolit av .NET API and create a custome GUI, or
2: Make use of the built in feature in the WATS_Teststand_Support.dll

This article will address option 2.

Getting started

  • Download and install the WATS client (Not a WATS user? sign up for a free trial at
  • Install the WATS TestStand add-on from the WATS Client Configuration panel
  • Launch the TestStand sequence Editor

note.png NOTE: This article use the plug-in structure introduced in TestStand 2012, version 2014 is used as example.


Open the WATS_ReportLogger.seq file located at C:\Users\Public\Documents\National Instruments\TestStand 2014 (64-bit)\Components\Models\ModelPlugins.

Make a copy (Save as) and rename the file, e.g. My_WATS_ReportLogger.seq

SAVE method

Open the Sequence Log To WATS using API and select the Log To WATS using API step.

 In the module tab, change the Save function to "Save(NationalInstruments.TestStand.Interop.API.SequenceContext, System.String ByRef, Int32 ByRef)". This should enable 2 new outputs. Create 2 new locals with the proper type (String/Number) and assign them to the new outputs as illustrated below.

When a UUT report is created using this Save method, it will return the unique identifier for the report (GUID) and the ID of the failed step (StepOrder).

Implement new steps

Insert an ELSE step just before the END step and copy the Log To WATS using API step in-between these step. Rename the step to "Create simple UUR report". In the Module tab, select Root Class: Virinco.WATS.Teststand.Support (not creatable) and .NET Invocation: CreateSimpleUUR.

 Next step is to connect all the inputs:

Note that ReepairOperationCode points to a Process in WATS. It is recommended to make a new process for this with limited Repair Codes for the operator. This is my ny process:

Now, add a Precondition to the step allowing it to only execute when the test has Failed:

Parameters.MainSequenceResults.Status == "Failed"

Update  these FileGlobals:



Save the My_WATS_ReportLogger.seq file and exit (close) the Sequence Editor.

Open the Sequence Editor again and select menu Configure>Result Processing...

Check the Show More Options box and click the Insert New... button, select My WATS Report Logger. Disable the original WATS Logging.

 Close the dialog (Click OK).

Run the example

It is now time to try out this new feature.

note.png NOTE: If you have made a new process (Repair Operation) at the server, please restart your computer making sure the new process is downloaded.

Open a test sequence and hit Test UUTs, make sure it has status Failed. After the status dialog box, you should now see the Create UUR Report popup dynamically listing the proper failure codes.

 Click on on of the codes an CREATE UUR.

You should now see the reports in you WATS reporting tool as example below





Have more questions? Submit a request


Please sign in to leave a comment.