LabVIEW 2009 Unit Test Framework Toolkit Help
Edition Date: June 2009
Part Number: 372584B-01
»View Product Info
Use the
Project Explorer window to add, duplicate, or delete test cases interactively. You also can add or delete test cases by
editing .lvtest files
.
Adding or Duplicating a Test Case
Complete the following steps to add or duplicate a test case.
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
- 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. |
- Right-click the .lvtest file to which you want to add a new test case and select Properties from the shortcut menu to display the Test Properties dialog box. On the Test Cases page, click the New button to add a new test case.
- Right-click the .lvtest file to which you want to add a new test case and select Properties from the shortcut menu 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. |
-
Configure the new test case.
-
Select File»Save to save the project.
Deleting a Test Case
Complete the following steps to delete a test case.
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
-
Right-click a .lvtest file and select Properties from the shortcut menu to display the
Test Properties dialog box. You also can double-click the .lvtest file to open the dialog box.
- Select Test Cases from the Category list to display the Test Cases page.
- If this test has more than one test case, use the Test Case control to select the test case you want to delete.
- Click the Delete button to delete this test case.
 |
Note If this test has only one test case, LabVIEW resets the input and expected values to 0 and the comparison types to =. |
-
Select File»Save to save the project.