LabVIEW 2009 Unit Test Framework Toolkit Help
Edition Date: June 2009
Part Number: 372584B-01
»View Product Info
Complete the following steps to create a user-defined test VI.
- Create a user-defined test VI from the utf_user_defined_test Template.vit file in one of the following ways:
- Open the utf_user_defined_test Template.vit file located in the labview\resource\Framework\Providers\utf 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:
| Element Name |
Data Type |
Notes |
Required† |
| time elapsed [ms] |
Numeric indicator |
Time in milliseconds. |
No |
| result (test) |
Enum |
Enum values must be Passed, Failed, Error, Skipped, and Not Processed. |
Yes |
| result (parameters) |
Array of cluster |
Each array is a cluster of comparison results between the expected and resulting values. |
No |
Notes:
† 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.
Refer to the labview\examples\Unit Test Framework\User-Defined\User-Defined Test.lvproj for an example that demonstrates how to use the Unit Test Framework Toolkit to create user-defined test VIs.