Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

The external test runner usage variant

This usage variant does not provide any test runner. You employ it when you only want to define a test tree and possibly an initialization function, and expect another (external) program to evaluate these tests. This external program will come with its own test runner.

If you plan to use an external test runner with your test module, you need to build it as a dynamic library. You need to define macro flag BOOST_TEST_DYN_LINK either in a makefile or before the header boost/test/unit_test.hpp inclusion. An external test runner utility is required to link with dynamic library.

The Unit Test Framework comes with an example external test runner console_test_runner: Given a name of the test module (implemented as a shared library), and a name of the initialization function defined therein, the program can run all the tests from the module's test tree.


PrevUpHomeNext