Complete the following steps to create a user-defined test VI.
  1. Create a user-defined test VI from the User-Defined Test Template.vit file in one of the following ways:
    • Select File»New to display the New dialog box and select VI»From Template»Unit Test Framework to open the User-Defined Test Template.vit file. You also can locate this file in the labview\templates\UnitTestFramework directory.
    • Create a test from a user-defined test VI. The test and user-defined test VI appear in the Project Explorer window. Right-click the user-defined test VI and select Open.
  2. Modify the VI to define your own test. Keep in mind the following requirements for the user-defined test VI:
    • Do not modify the Unit Test Framework Result indicator name or cluster elements.
    • The Unit Test Framework Result indicator contains the following three cluster elements:
      Element NameData TypeNotesRequired
      time elapsed [ms]Numeric indicatorTime in milliseconds.No
      result (test)EnumEnum values must be Passed, Failed, Error, Skipped, and Not Processed.Yes
      result (parameters)Array of clusterEach array is a cluster of comparison results between the expected and resulting values.No
      Note You must include data from this element in the Unit Test Framework Result indicator.
    • The Unit Test Framework Result indicator must be connected to the connector pane.
  3. Wire the result of your test to the result (test) element.
  4. Optional: For advanced test VIs, wire the results of your tests to the time elapsed [ms] and results (parameters) elements.
  5. Select File»Save As to save this user-defined test VI in an easily accessible location.
    Note If you rename a user-defined test VI that you create from the shortcut menu, you must specify the new User-defined test VI file path on the Configuration page of the Test Properties dialog box.