User Tools

Site Tools




13 Unit Test Structure

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.

How do we integrate unit tests in our project structure

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.


Directory Structure

/<%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.
             // 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.                         // Main unit testing VI. This VI executes all unit tests.

Project Explorer Structure

code/common/unittest-structure.txt · Last modified: 2020/05/20 14:31 by manuel.sebald