Skip to content

Tests (user)

Tests compilation can be enabled at configure time using the option -DBUILD_TESTING=ON (OFF by default). It is required only for unit-tests and end-to-end tests.

After build, tests can be run with ctest :

cd _build
ctest -C Release --output-on-failure

All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run.
Use ctest -N to see all available tests

For more information on ctest call, see the cmake documentation

Running JSON tests

To run JSON tests, a study batch is first required.

cd ${Antares_Simulator_ROOT}/src/tests/resources/batches
cd ${Antares_Simulator_ROOT}/build
ctest -C Release --output-on-failure -R json