mirror of
https://github.com/boostorg/test.git
synced 2026-02-17 14:12:08 +00:00
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
[#ref_output_progress][section:test_output_progress Test progress display]
|
|
In case if the test module involves lengthy computation split among multiple test cases you may be interested in
|
|
progress monitor. The test runners supplied with the __UTF__ support simple text progress display, implemented based
|
|
on
|
|
``
|
|
boost::progress_display
|
|
``
|
|
|
|
[footnote The __UTF__ interfaces allow implementing an advanced GUI based test runner with arbitrary progress display controls].
|
|
|
|
The progress display output is enabled using the __UTF__ parameter __param_show_progress__.
|
|
|
|
|
|
The __UTF__ has no ability to estimate how long the test case execution is going to take and the manual test
|
|
progress update is not supported at this point. The __UTF__ tracks the progress on test case level. If you want to
|
|
see more frequent progress update, you need to split the test into multiple test cases.
|
|
|
|
|
|
In default configuration both test log and test progress outputs are directed into standard output stream. Any test
|
|
log messages are going to interfere with test progress display. To prevent this you can either set log level to
|
|
lower level or redirect either test log or test progress output into different stream during test module
|
|
initialization. Use following interface to redirect test progress output:
|
|
|
|
|
|
``
|
|
boost::unit_test::progress_monitor.set_stream( std::ostream& )
|
|
``
|
|
|
|
[import examples/example49.cpp]
|
|
[import examples/example49.output]
|
|
[table:id_example49 Progress report for the test module with large amount of test cases
|
|
[
|
|
[Code]
|
|
[Output]
|
|
]
|
|
[
|
|
[[example49]]
|
|
[[example49o]]
|
|
]
|
|
]
|
|
|
|
|
|
|
|
[endsect] [/section:test_output_progress] |