2019.08 to 2019.09 - Manual - AxUnit - AxUnit - AxUnit,

AxUnit (legacy) CLI Tool (test)

Portfolio
SIMATIC AX
Product
AxUnit
Software version
3.0.4
Edition
08/2025
Language
English (original)
Package Name
@ax/axunit-docs

In versions prior to 2019.09 the definition of tests worked by naming convention. If the function name started with Test_ the function was considered as a test.

FUNCTION Test_ADD_of_4_plus_4_returns_8
    VAR_TEMP
        res:INT;
    END_VAR

    res := ADD(a:=4,b:=4);
    Assert_Equal_INT(expected:=8, actual:=res);
END_FUNCTION

Since 2019.09 testing framework uses pragma feature of the ST programming language to mark functions as test functions and do not recognize tests following naming convention.

{Test}
FUNCTION ADD_of_4_plus_4_returns_8
    VAR_TEMP
        res:INT;
    END_VAR

    res := ADD(a:=4,b:=4);
    Assert_Equal_INT(expected:=8, actual:=res);
END_FUNCTION

To get familiar with the new test definition syntax take a look into the chapter How to write unit tests.