Opened 10 years ago
Last modified 6 years ago
#7417 new Patches
Detailed test status is not available in the Boost.Test log (status, assertions, passed) and so live test case status cannot be tracked
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | To Be Determined | Component: | test |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Currently with Boost.Test it is not possible to use the test output to show detailed live test progress. By detailed I mean, test status, number of passed assertions and total number of assertions. This is because:
- Only basic status information is provided through
stdout
(the Boost.Test log) as tests are proceeding. Notably just whether a test has started or a test has finished. - Detailed information is accessible by accessing the test report information captured as part of the Boost.Test report functionality which is typical sent to
stderr
. - Report data is only output when all tests are complete therefore this information cannot be used for live reporting. In other words a solution is not to listen on both
stdout
andstderr
The attached patch adds additional test status information to the information sent to stdout - the Boost.Test log. This allows arbitrary test tools to be developed that interpret the test output for live test progress reporting.
We use one such tool based on scons that allows us to view live test progress on the console. This is not possible with the current Boost.Test since detailed test status is not available until all cases have completed.
This patch compliments the patches attached to:
and taken together allows for sophisticated test tools to be built on top of the Boost.Test output.
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | boost_test_detailed_status_to_stdout.diff added |
---|
comment:1 by , 10 years ago
Summary: | It is not possible to → Detailed test status is not available in the Boost.Test log (status, assertions, passed) and so live test case status cannot be tracked |
---|
Since Boost 1.62, there is the possibility to define a user logger and add it to the set of loggers (and have several loggers at the same time).
I updated the documentation of the loggers to a point that you should be able to implement your live test cases. I use this for being able to write JUnit logging output, which is a logger and a reporting facility at the same time.
I believe you can derive your own logger from the JUnit implementation. The test reporter and test loggers have indeed the same interface, and they both receive the same signals from the framework. There is also the possibility to have detailed logs during the test module execution.
I would rather suggest go this direction, you can have my support if needed.