Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

libs/test/doc/adv_scenarios/external_test_runner.qbk

[/
 / Copyright (c) 2003 Boost.Test contributors
 /
 / Distributed under the Boost Software License, Version 1.0. (See accompanying
 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 /]

[section:external_test_runner The external test runner usage variant]

This usage variant does not provide any [link boost_test.adv_scenarios.test_module_runner_overview test runner].
You employ it when you only want to define a [link ref_test_tree test tree] and possibly an
[link boost_test.adv_scenarios.test_module_init_overview 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 __UTF__ 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.

[endsect] [/section:external_test_runner]