Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Adding, Duplicating, and Deleting Test Cases (Unit Test Framework Toolkit)

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.

  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.
    • 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.
  3. Configure the new test case.
  4. Select File»Save to save the project.

Deleting a Test Case

Complete the following steps to delete a test case.

  1. Open the LabVIEW project that contains the files on which you want to perform unit testing.
  2. 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.
  3. Select Test Cases from the Category list to display the Test Cases page.
  4. If this test has more than one test case, use the Test Case control to select the test case you want to delete.
  5. 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 =.
  6. Select File»Save to save the project.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit