LabVIEW 2013 Unit Test Framework Toolkit Help
»View Product Info
Complete the following steps to create a user-defined test VI.
- Create a user-defined test VI from the User-Defined Test Template.vit file in one of the following ways:
- Select File»New to display the New dialog box and select VI»From Template»Unit Test Framework to open the User-Defined Test Template.vit file. You also can locate this file in the labview\templates\UnitTestFramework directory.
- Create a test from a user-defined test VI. The test and user-defined test VI appear in the Project Explorer window. Right-click the user-defined test VI and select Open.
- Modify the VI to define your own test. Keep in mind the following requirements for the user-defined test VI:
- Do not modify the Unit Test Framework Result indicator name or cluster elements.
- The Unit Test Framework Result indicator contains the following three cluster elements:
|time elapsed [ms]
||Time in milliseconds.
||Enum values must be Passed, Failed, Error, Skipped, and Not Processed.
||Array of cluster
||Each array is a cluster of comparison results between the expected and resulting values.
|Note: You must include data from this element in the Unit Test Framework Result indicator.
- The Unit Test Framework Result indicator must be connected to the connector pane.
- Wire the result of your test to the result (test) element.
- (Optional) For advanced test VIs, wire the results of your tests to the time elapsed [ms] and results (parameters) elements.
- Select File»Save As to save this user-defined test VI in an easily accessible location.
||Note If you rename a user-defined test VI that you create from the shortcut menu, you must specify the new User-defined test VI file path on the Configuration page of the Test Properties dialog box.
Refer to the labview\examples\Unit Test Framework\User-Defined Test\User-Defined Test.lvproj for an example that demonstrates how to use the Unit Test Framework Toolkit to create user-defined test VIs.
Creating a Test from a User-Defined Test VI