Complete the following steps to create a VI that executes tests from .lvtest files programmatically.
  1. Select File»New VI to create a new, blank VI.
  2. Display the block diagram by selecting Window»Show Block Diagram.
  3. If you do not see the Functions palette, select View»Function Palette to display this palette.
  4. On this palette, select Programming»Unit Test Framework.
    The Unit Test Framework VIs appear.
  5. Add the Run Tests from File VI to the block diagram.
  6. Add the Open Results Window VI to the block diagram.
  7. Wire the test results out output of the Run Tests from File VI to the test results in input of the Open Results Window VI.
  8. Right-click the test file paths input of the Run Tests from File VI and select Create»Control from the shortcut menu.
    A front panel control appears to the left of this VI. This control represents an array of paths to the .lvtest files that you want to execute.
  9. Wire all error in and error out terminals on the block diagram.
  10. Display the front panel and click the Browse button on the test file paths control to select an .lvtest file.
  11. Optional: Move the cursor over the test file paths control. When a double-headed arrow appears, click and drag the border of the control to add more elements to the array of paths.
    You also can use the numeric control to display subsequent array elements. Add additional .lvtest files that you want to execute.
  12. Select File»Save As and save this VI in an easily accessible location.
  13. Click the Run button to run the VI.
    Note When you execute tests from .lvtest files programmatically, LabVIEW executes tests in the order as they listed in the test file paths control.