|Download Help (Windows Only)|
Use the Project Explorer window to create, configure, manage, and execute tests interactively in a LabVIEW project. You must create and save a LabVIEW project before you can create tests. When you save a project, LabVIEW creates a project file (.lvproj) that includes references to all the files in the project. Use projects to group together all the files you need to perform unit testing. Use virtual folders, auto-populating folders, and LabVIEW project libraries to organize a project.
The Project Explorer window includes the Items and Files pages. The Items page displays all the .lvtest files, VIs, folders, and libraries that exist in the project tree. The Files page displays the project items that have a corresponding file on disk. When you create a test from the Project Explorer window, LabVIEW creates a .lvtest file on disk. A .lvtest file icon appears on both the Items and Files pages.
The following figure shows an example project.
After you execute tests and return to the Project Explorer window, colored dots appear next to the icon of each test you executed. These dots denote whether the test passed (green), failed (red), produced errors (exclamation mark), or was skipped (gray).
The following figure shows an example of test results in the Project Explorer window.
|Note After every subsequent test execution, LabVIEW updates the test results in the Project Explorer window. However, you cannot save the test results when you close the project.|
|Note You might need to expand the Project Explorer window horizontally to view this toolbar.|
You can show or hide the Unit Test Framework toolbar by selecting View»Toolbars»Unit Test Framework. You also can right-click an unused area on the toolbar and select Unit Test Framework.
The Unit Test Framework toolbar on the Project Explorer window contains the following buttons.
|Run Unit Tests—Executes all tests in a LabVIEW project. If test filters are set, such as executing tests by priority or executing only modified tests, LabVIEW executes only filtered tests.|
|Unit Test Framework Results—Displays the Unit Test Framework Results window. Use this window to view, save, and load test results.|
You can configure global settings related to creating and executing tests by using the Project Properties dialog box. In the Project Explorer window, select Project»Properties to display this dialog box. You also can click the Project Properties button on the Project toolbar or right-click the project root and select Properties from the shortcut menu to display this dialog box.
The Build Specifications item in the Project Explorer window allows you to create and configure build specifications for LabVIEW builds. A build specification contains all the settings for the build, such as files to include, directories to create, and settings for VIs.
You can configure the following types of build specifications to include .lvtest files:
|Caution When configuring VIs in a source distribution, do not place checkmarks in the Remove front panel and Remove block diagram checkboxes on the Source File Settings page of the Source Distribution Properties dialog box for any VI under test. If you remove the front panel or block diagram of a VI under test, LabVIEW returns test errors on the Test Errors page of the Unit Test Framework Results window.|
You must have the Application Builder installed to build installers and zip files. The LabVIEW Professional Development System includes the Application Builder. If you use the LabVIEW Base Development System or Full Development System, you can purchase the Application Builder separately by visiting the National Instruments website. If you have already purchased the Application Builder, select Help»Activate LabVIEW Components to activate the product.
You can hide the Build Specifications item in the Project Explorer window. If you hide this item you must display it again to access the item.