Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Unit Test Framework: Test Vectors cause VI output to always be 0?

(Originally posted at https://forums.ni.com/t5/LabVIEW/LabVIEW-Unit-Test-Framework-Test-Vectors-cause-VI-output-to/m-p/407... )

 

Hello, I'm trying out the Unit Test Framework. I'm struggling to make Test Vectors work correctly.

 

My unit test simply involves 1 VI that takes 2 numeric inputs and outputs their average.

Average.vi.png

 


When I manually set up every single test case and don't use Test Vectors, I get the expected results:

 

Manually entering every test case: The VI's outputs correctly reflect the inputsManually entering every test case: The VI's outputs correctly reflect the inputs


However, when I apply the same inputs using Test Vectors, my VI always outputs 0 no matter what the inputs are:

 

Using test vectors: The VI's outputs are always 0Using test vectors: The VI's outputs are always 0


 

What's going on? (Test files attached -- LabVIEW 2020)

Certified LabVIEW Developer
0 Kudos
Message 1 of 2
(1,988 Views)

Hi JKSH,

 

This isn't going to be the most helpful answer in terms of understanding what is wrong here.  I downloaded your example project and found the same results as you have seen.  I messed around with it a bit and ended up removing and re-adding both the VI under test and the test vector file in the Test Properties and it started working correctly.

 

So it looks like you're not doing anything wrong, UTF is just a bit touchy when using test vectors

 

Cheers
Brett

Senior Software Development Engineer
Certified LabVIEW Architect and LabVIEW Champion
https://theLonelyAnt.com
https://GDevConANZ.org.au


0 Kudos
Message 2 of 2
(1,870 Views)