In general, we strive to make unit tests and work in a test driven way. But dependent on the project, the customer and the circumstances we don't force unit testing, we force the pragmatic approach.
From all the unit testing frameworks we decided to use Caraya from JKI.
We separate the the unit tests from the source code of the project (which we test) by placing the unit test VIs in a separate folder (next to the
<Project>_Source folder) and creating a separate LV project for it.
/<%project directory%> /Tests // All sorts of tests for the repo. /Unit Tests // Unit Tests for the source code. /UT_Unit-1 // All unit tests for a library or class (//Unit-1//). UT_Library-1.lvlib // Library for this logical collection of unit tests. UT_Library-1_Main.vi // This VI executes all unit tests in this library. Test_<Description>.vi // Test case for one or more related unit tests. /UT_Unit-2 // All unit tests for a library or class (//Unit-2//). Unit_Tests_<project_name>.lvproj // Project file for the unit tests. UT_Main.vi // Main unit testing VI. This VI executes all unit tests.