LabVIEW Unit Test Framework Toolkit API Reference

Adding or Duplicating Test Cases (Unit Test Framework Toolkit)

  • Updated2023-02-21
  • 2 minute(s) read

Use the Project Explorer window to add or duplicate test cases interactively. You also can add or delete test cases by editing .lvtest files..

Complete the following steps to add or duplicate a test case.

  1. Open the LabVIEW project that contains the files on which you want to perform unit testing.
  2. Add a test case to a test in one of the following ways:
    • Right-click the VI for which you want to add a new test case and select Unit Tests»New Test Case»testname.lvtest from the shortcut menu, where testname is the name of the .lvtest file to which you want to add a test case. The Test Cases page of the Test Properties dialog box appears, displaying the new test case.
      Note  A .lvtest test file must already exist in the project for this VI.
    • Double-click the .lvtest file to which you want to add a new test case to display the Test Properties dialog box. On the Test Cases page, click the New button to add a new test case.
    • Double-click the .lvtest file to which you want to add a new test case to display the Test Properties dialog box. On the Test Cases page, click the Duplicate button to duplicate the current test case.
      Note  When you add or duplicate a test case, LabVIEW adds the new test case to the end of the test case list and displays the new test case.
  3. Configure the new test case.
  4. Select File»Save to save the project.

Log in to get a better experience