In the Test Cases page, you can assign test vectors to each input or output of a VI to test this VI with multiple input or expected values in one test case.

After you assign test vectors to inputs of the VI under test, LabVIEW generates permutations for the input values. After you assign test vectors to outputs of the VI under test, LabVIEW compares the number of the input permutations and the size of the test vector assigned to the output terminal in the following methods:

  • When the number of the input permutations is equal to the size of the test vector assigned to the output terminal, LabVIEW executes the test by comparing the resulting values with the expected values in the test vector.
  • When the number of the input permutations is smaller than the size of the test vector assigned to the output terminal, LabVIEW executes the test and the Test Cases page displays a warning icon.
  • When the number of the input permutations is larger than the size of the test vector assigned to the output terminal, LabVIEW reports an error and does not execute the test.

You can use test vector indexes to configure the numbers of input value permutations. LabVIEW does not set indexes to test vector by default. If the assigned test vectors have no or different indexes, LabVIEW generates all possible permutations of the input values. For example, you create two sequence test vectors, (3, 4, 5) and (1, 2). You then assign these test vectors to the x and y controls of the following VI with no or different indexes.

The following picture shows a block diagram of example test vectors:

When you execute this test, LabVIEW tests this VI for six times with the following x and y values:

  • x=3 y=1
  • x=3 y=2
  • x=4 y=1
  • x=4 y=2
  • x=5 y=1
  • x=5 y=2

If the assigned test vectors have identical indexes, LabVIEW sends the test vector values to the inputs one by one and stops the test when any test vector reaches the end. For example, you can assign two test vectors, (3, 4, 5) and (1, 2), to the x and y controls of the previous VI and set the indexes of these test vectors to index 1. When you execute this test, LabVIEW tests this VI for twice with the following x and y values:

  • x=3 y=1
  • x=4 y=2