c++unit-testingtestingboost.test

Boost.Test show Test durations


I'm using Boost.Test (1.60.0) to test my projects. In order to identify the most time consuming tests, I wanted to know the test duration of every test in milliseconds. The total amount of time consumed by all tests would be also nice.

Does Boost.Test have such a feature? If not how can I implement such a time measurement on my own?


Solution

  • --log_level=unit_scope (or BOOST_TEST_LOG_LEVEL environmental variable)

    This doesn't print any test messages but is verbose enough to print durations for each test suite and each test case in any suite.