test_module_runner_overview.qbk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [/
  2. / Copyright (c) 2003 Boost.Test contributors
  3. /
  4. / Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. /]
  7. [section:test_module_runner_overview Test module runner]
  8. A ['test module runner] is an ['orchestrator] or a ['driver] that, given the test tree, ensures the test tree is initialized,
  9. tests are executed and necessary reports generated. It performs the following operations:
  10. * initialize the test module using the supplied [link boost_test.adv_scenarios.test_module_init_overview ['initialization function]];
  11. * select output media for the test log and the test results report;
  12. * execute test cases as specified by run-time parameters;
  13. * produce the test results report;
  14. * generate the appropriate return code.
  15. The __UTF__ comes with the default test runner. There is no need to call it explicitly. The default generated test module's
  16. [link boost_test.adv_scenarios.entry_point_overview entry point] invokes the default test runner. The default test runner is
  17. declared with the following signature:
  18. ```
  19. namespace boost { namespace unit_test {
  20. typedef bool (*init_unit_test_func)();
  21. int unit_test_main( init_unit_test_func init_func, int argc, char* argv[] );
  22. } }
  23. ```
  24. The test runner may return one of the following values:
  25. [table
  26. [[Value][Meaning]]
  27. [[`boost::exit_success`][
  28. * No errors occurred during testing, or
  29. * the success result was forced with command-line argument `--[link boost_test.utf_reference.rt_param_reference.result_code `result_code`]=no`.]]
  30. [[`boost::exit_test_failure`][
  31. * Non-fatal errors detected and no uncaught exceptions were thrown during testing, or
  32. * the initialization of the __UTF__ failed. ]]
  33. [[`boost::exit_exception_failure`][
  34. * Fatal errors were detected, or
  35. * uncaught exceptions thrown during testing. ]]
  36. ]
  37. An advanced test runner may provide additional features, including interactive GUI interfaces, test coverage and profiling support.
  38. [endsect] [/section:test_module_runner_overview]