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.
Specifying a Timeout for a Test
Complete the following steps to specify a timeout for a test.
-
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 Advanced from the Category list to display the Advanced page.
- Place a checkmark in the Set timeout checkbox.
- 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. |
-
Click the OK button to close the dialog box and return to the Project Explorer window.
-
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.
-
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 Advanced from the Category list to display the Advanced page.
- Place a checkmark in the Set minimum code coverage checkbox.
- 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. |
-
Click the OK button to close the dialog box and return to the Project Explorer window.
-
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.
-
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 Advanced from the Category list to display the Advanced page.
- Use the Repetitions control to specify the number of times LabVIEW repeats this test.
-
Click the OK button to close the dialog box and return to the Project Explorer window.
-
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.
-
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 Advanced from the Category list to display the Advanced page.
- Use the Digits of precision for floating-point comparison control to set the digits of precision for comparing floating-point numbers during test execution.
-
Click the OK button to close the dialog box and return to the Project Explorer window.
-
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.
-
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 Advanced from the Category list to display the Advanced page.
- Click the Input/output values list and select which controls and indicators of the VI under test appear on the Test Cases page.
-
Click the OK button to close the dialog box and return to the Project Explorer window.
-
Select File»Save to save the project.