From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing and Performance LabView 2020 Unit Test Framework

Hello everybody,

 

So far I have created my own test environment for the implementation of test driven development in LabView during software development and used this to test SubVIs in our company software platform.

 

Since creating these self-created test VIs sometimes takes a certain amount of time, I looked at LabView's Unit Test Framework (UTF) and made comparisons.

In the example shown, the Test VI is called with 120 different inputs for the "test string in" control. The total processing time for this 120 test is about 2 seconds.

 

test vi with vi under testtest vi with vi under test

 

The following problem has presented itself:
when I examine the VI under test with the same test data set in UTF, LabView takes about 24 minutes to do it.

What am I doing wrong when using UTF? It seems to me that the VI under test is recompiled for each individual test case and the inputs and outputs of the VI are drawn using references.

 

Is there a way to massively increase execution speeds of UTF?
What experiences are here?
Is the UTF even designed to do over huntert of test coverage?

 

This LabView behavior is absolutely unacceptable. Why should I use the UTF if it robs me so massively of my lifetime? The implementation of unit test should be absolutely low-threshold. It should also not be possible for any software developer to find arguments against extensive test coverage. Processing times of 20 minutes and more are definitely an argument against carrying out good test coverage. What were the labview developers thinking during the implementation? One SubVi and a maximum of two or three testcases?

 

Thanks,

Uwe

0 Kudos
Message 1 of 2
(499 Views)

Your comments regarding UTF performance are well-known in the community. There are some ways of improving performance but not at the magnitude I suspect you are looking for.

 

My experience is that most people use an alternate test framework unless 1) the ISO compliance of UTF is of utmost importance or 2) they only have a handful of tests (and are happy with the regular coffee break) or 3) they need code coverage and are looking for free/open source.

 

Look here for an introduction of various frameworks available: https://thelonelyant.com/labview-unit-testing-tools-overview/ . There is also a community group for unit testing that might be of value to join: https://forums.ni.com/t5/Unit-Testing-Group/gh-p/5182 

0 Kudos
Message 2 of 2
(456 Views)