LabVIEW 2009 Unit Test Framework Toolkit Help
Edition Date: June 2009
Part Number: 372584B-01
»View Product Info
Use the
Project Explorer window to execute tests interactively. LabVIEW executes tests in the order as they are listed in the project. The
Unit Test Framework Results window appears after test execution is complete.
 |
Tip If the test you want to execute contains password-protected VIs, you can store the VI passwords in the project settings. During execution, LabVIEW stores the passwords in the LabVIEW password cache and saves them in the project file (.lvproj). LabVIEW encrypts the passwords before saving them in the project file. |
Executing Tests
Complete the following steps to execute tests in a
LabVIEW project.
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
- Right-click a
.lvtest file
and select Run from the shortcut menu.
 |
Note You also can execute multiple tests by pressing the <Ctrl> key while clicking each .lvtest file. Then right-click the selection and select Run Unit Tests from the shortcut menu. |
- Click the OK button to close the dialog box and return to the Project Explorer window.
Executing All Tests in a Project
Complete the following steps to execute all tests in a project.
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
-
Click the Run Unit Tests button
on the Unit Test Framework toolbar.
Executing All Tests Associated with a VI
Complete the following steps to execute all tests associated with a VI.
 |
Caution LabVIEW cannot execute all tests associated with a VI if the VI and tests deploy to different targets. In this situation, you must follow the steps to execute tests in a LabVIEW project. |
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
- Right-click a VI and select Unit Tests»Run from the shortcut menu.
 |
Note You also can execute tests associated with multiple VIs by pressing the <Ctrl> key while clicking each VI. Then right-click the selection and select Run Unit Tests from the shortcut menu. |
Executing All Tests Associated with a LabVIEW Class
Complete the following steps to execute all tests associated with a LabVIEW class.
 |
Note LabVIEW executes all tests associated with the LabVIEW class library you select and all tests in the project that are assigned to VIs in the LabVIEW class library. |
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
- Right-click a LabVIEW class library file (.lvclass) and select Unit Tests»Run from the shortcut menu.
 |
Note You can execute tests on classes that inherit from another LabVIEW class. Right-click the parent class library file and select Unit Tests»Run Including Children from the shortcut menu. LabVIEW executes all tests associated with the parent class and all tests associated with the children classes. |
Executing All Tests in a Folder or Project Library
Complete the following steps to execute all tests in a virtual folder, auto-populating folder, or LabVIEW project library.
-
Open the LabVIEW project that contains the files on which you want to perform unit testing.
- Right-click a folder or project library and select Unit Tests»Run from the shortcut menu.
 |
Note You also can execute tests in multiple folders or project libraries by pressing the <Ctrl> key while clicking each folder or project library. Then right-click the selection and select Run Unit Tests from the shortcut menu. |