Exporting and Importing Test Vectors (Unit Test Framework Toolkit)
- Updated2023-02-21
- 3 minute(s) read
Exporting and Importing Test Vectors (Unit Test Framework Toolkit)
You can modify values of a test vector by using an array control of a VI. Complete the following steps to modify the values of a test vector by using an array control:
- Export values from a test vector to a VI.
- Edit the values by using the front panel of the VI.
- Import modified values to the test vector.
To export or import the values of a test vector, you must have a VI that contains an array control with a proper data type.
If you export or import non-numeric values, the data type of the test vector and array control must be the same. For example, if you export values from a Boolean test vector to an array control, the data type of the control must be array of Booleans.
If you export numeric values of a test vector to an array control, the data type of the array control must have the same or larger scale than the test vector data type. For example, if you export values of an I8 test vector, the data type of the array control can be I8, I16, single floating-point, or other numeric data types that have larger scales.
If you import numeric values from an array control to a test vector, the data type of the test vector must have the same or larger scale than the array control data type. For example, if you import values from a single floating-point array control, the data type of the test vector can be single floating-point, double floating-point, or other numeric data types that have larger scales.
Exporting Values from a Test Vector to an Array Control
Complete the following steps to export values from a test vector to an array control:
- Open the VI that contains the target array control.
- Click the Export button in the Test Vector Properties - Edit dialog box to display the Test Vector Properties - Export dialog box.
- Select the source test vector from the Test Vectors list.
- Select the VI that you opened in step 1 from the Target VIs list.
Note The Target VIs list does not display the VI if you do not open this VI in LabVIEW. - Select the target array control from the Target Controls list. LabVIEW displays the array controls that have proper data types only.
- Click the OK button to close this dialog box and export the values to the target array control. LabVIEW displays the front panel of this VI after you click the OK button.
Importing Values from an Array Control to a Test Vector
Complete the following steps to import values from an array control to a test vector.
- Open the VI that contains the source array control.
- Click the Import button in the Test Vector Properties - Edit dialog box to display the Test Vector Properties - Import dialog box.
- Select the VI that you opened in step 1 from the Source VIs list.
Note The Source VI list does not display the VI if you do not open this VI in LabVIEW. - Select the target test vector from the Target Test Vectors list.
- Select the source array control from the Source Controls list. LabVIEW displays the array controls that have proper data types only.
- Click the OK button to close this dialog box and import the values to the target test vector.