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 for the latest Boost documentation.
PrevUpHomeNext

Test log output

The test log is produced during the test execution. All entries in the test log are assigned a particular log level. Only the entries with level that exceeds the active log level threshold actually appear in the test log output. Log levels are arranged by the 'importance' of the log entries. Here is the list of all levels in order of increasing 'importance':

Table 4. Messages

Notifications

Meaning

Success

This category includes messages that provide information on successfully passed assertions

Test tree traversal

This category includes messages that are produced by the Unit Test Framework core and indicate which test suites/cases are currently being executed or skipped

General information

This category includes general information messages produced in most cases by a test module author using the macro BOOST_TEST_MESSAGE

Warning

This category includes messages produced by failed warning level assertions

Non fatal error

This category includes messages produced by failed check level assertions

Uncaught C++ exceptions

This category includes messages that are produced by the Unit Test Framework and provide detailed information on the C++ exceptions uncaught by the test case body.

Non-fatal system error

This category includes messages that are produced by the Unit Test Framework itself and provides information about caught non-fatal system error. For example it includes messages produced in the case of test case timeout or if floating point values calculation errors are caught.

Fatal system error

This category includes messages produced by failed require level assertions and by the Unit Test Framework itself in case of abnormal test case termination.


[Note] Note

The active log level works namely as threshold, not as selector. For the given active log level threshold, all test log entries with importance higher than threshold are enabled and all test log entries with importance below threshold are disabled.

In addition to the levels described above the test log defines two special log levels. The current log level can be set to:

By default the active log level threshold is set to "non fatal error messages" and the test log output is generated in the human readable format. The active log level threshold and the output format can be configured at runtime during a test module invocation and at compile time from within a test module using the test log public interfaces. For example, for automated test module output processing it might be more convenient to use the XML based format.

In most cases, the Unit Test Framework can't provide an exact location, where system error occurs or uncaught C++ exception is thrown from. To be able to pinpoint it as close as possible the Unit Test Framework keeps track of checkpoints - the location a test module passed through. A test case entrance and exit points, a test tool invocation point the Unit Test Framework tracks automatically. Any other checkpoints should be entered by you manually. The test log provides two macros for this purpose:


PrevUpHomeNext