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

Configuring Advanced Settings of Tests (Unit Test Framework Toolkit)

LabVIEW 2009 Unit Test Framework Toolkit Help

Edition Date: June 2009

Part Number: 372584B-01

»View Product Info

Use the Advanced page of the Test Properties dialog box to configure advanced settings of tests.

Note  The settings on this page apply to only the .lvtest file you are configuring and override the global settings specified on the Unit Test: Test Creation page of the Project Properties dialog box.

Specifying a Timeout for a Test

Complete the following steps to specify a timeout for a test.

  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 Advanced from the Category list to display the Advanced page.
  4. Place a checkmark in the Set timeout checkbox.
  5. Use the Timeout control to specify a timeout, in seconds.
    Note  Use timeout for tests of VIs that loop forever or require you to perform any tasks manually.
  6. Click the OK button to close the dialog box and return to the Project Explorer window.
  7. Select File»Save to save the project.

The next time you execute this test, LabVIEW runs the VI under test. If the VI under test times out during execution, LabVIEW stops the VI and test results show this test as failed.

Specifying a Minimum Code Coverage Requirement

Complete the following steps to specify a minimum code coverage requirement.

  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 Advanced from the Category list to display the Advanced page.
  4. Place a checkmark in the Set minimum code coverage checkbox.
  5. Use the Code coverage control to specify a minimum code coverage requirement, in percent.
    Note  Use minimum code coverage requirement for VIs that contain Case structures.
  6. Click the OK button to close the dialog box and return to the Project Explorer window.
  7. Select File»Save to save the project.

The next time you execute this test, LabVIEW runs the VI under test and measures the percentage of subdiagrams executed. If the VI under test does not meet the minimum code coverage requirement you specified, test results show this test as failed.

Specifying the Number of Times to Repeat a Test

Complete the following steps to specify the number of times to repeat a test.

  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 Advanced from the Category list to display the Advanced page.
  4. Use the Repetitions control to specify the number of times LabVIEW repeats this test.
  5. Click the OK button to close the dialog box and return to the Project Explorer window.
  6. Select File»Save to save the project.

The next time you execute this test, LabVIEW runs the VI under test the number of times you specified. Test results show the results of each repetition.

Specifying the Digits of Precision for Floating-Point Comparison

Complete the following steps to specify the digits of precision for comparing floating-point numbers.

  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 Advanced from the Category list to display the Advanced page.
  4. Use the Digits of precision for floating-point comparison control to set the digits of precision for comparing floating-point numbers during test execution.
  5. Click the OK button to close the dialog box and return to the Project Explorer window.
  6. Select File»Save to save the project.

Configuring the Input/Output Setting of the VI Under Test

Complete the following steps to configure which controls and indicators of the VI under test appear on the Test Cases page.

  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 Advanced from the Category list to display the Advanced page.
  4. Click the Input/output values list and select which controls and indicators of the VI under test appear on the Test Cases page.
    Note  If you select the Include controls and indicators from connector pane setting, make sure you select a connector pane pattern and assign terminals for the VI under test.
  5. Click the OK button to close the dialog box and return to the Project Explorer window.
  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