Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Exchanging Values Between the VI under Test, Setup VI, Teardown VI, and the Test Cases Page (Unit Test Framework Toolkit)

LabVIEW 2013 Unit Test Framework Toolkit Help

Edition Date: June 2013

Part Number: 372584F-01

»View Product Info
Download Help (Windows Only)

You can modify the input and expected values by using the front panel of the VI under test, setup VI, and teardown VI and then importing these values to a test case. You also can export values from a test case to the VI under test, setup VI, and teardown VI.

Note  LabVIEW lists the controls and indicators from the VI under test on the Test Cases page. If the Input/output values setting on the Unit Test Framework page of the Project Properties dialog box is Include controls and indicators from connector pane, make sure you select a connector pane pattern and assign the terminals for the VI under test.

Complete the following steps to exchange values between the VI under test, setup VI, teardown VI, and the Test Cases page.

  1. Open the LabVIEW project that contains the files on which you want to perform unit testing.
  2. Double-click a .lvtest file to display the Test Properties 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 configure.
  5. Click the Export Values to VI button to export the input and expected values from the current test case to the VI under test, setup VI, and teardown VI. The VI under test, setup VI, and teardown VI open in a separate window.
    Tip  Use the Export Values to VI button to open the VI under test while configuring a test.
  6. From the front panel of the VI under test, setup VI, and teardown VI, modify the values of any controls and indicators you want to configure.
  7. On the Test Properties dialog box, click the Import Values from VI button to import values from the VI under test, setup VI, and teardown VI to the current test case.
    Note  When you import values from the VI under test, setup VI, and teardown VI, LabVIEW replaces the input and expected values of the current test case with the values of the corresponding terminals in the VI under test, setup VI, and teardown VI.
  8. Select a comparison type from the Comparison list of the output terminal you want to configure. Repeat this step for other output terminals.
  9. Click the OK button to close the dialog box and return to the Project Explorer window.
  10. Select File»Save to save the project.

The next time you execute this test, LabVIEW runs the setup VI and VI under test by using the input values you specified for each test case in the .lvtest file. LabVIEW then compares the resulting values with the expected values of the VI under test and teardown VI by using the comparison types you specified.

Related Information

Assigning Terminals to Controls and Indicators

Selecting a Connector Pane Pattern


 

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