Boost C++ Libraries 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.

Test module runner

A test module runner is an orchestrator or a driver that, given the test tree, ensures the test tree is initialized, tests are executed and necessary reports generated. It performs the following operations:

The Unit Test Framework comes with the default test runner. There is no need to call it explicitly. The default generated test module's entry point invokes the default test runner. The default test runner is declared with the following signature:

namespace boost { namespace unit_test {

  typedef bool (*init_unit_test_func)();

  int unit_test_main( init_unit_test_func init_func, int argc, char* argv[] );

} }

The test runner may return one of the following values:




  • No errors occurred during testing, or
  • the success result was forced with command-line argument --[link boost_test.utf_reference.rt_param_reference.result_code result_code]=no.


  • Non-fatal errors detected and no uncaught exceptions were thrown during testing, or
  • the initialization of the Unit Test Framework failed.


  • Fatal errors were detected, or
  • uncaught exceptions thrown during testing.

An advanced test runner may provide additional features, including interactive GUI interfaces, test coverage and profiling support.