Hi,
Recently we have decided to use the Boost Test libraries to provide automated tests to our project. To help with the test result visualization, we created an utility to generate HTML pages from Boost test reports (as generated by -- report_level=detailed). In the begining of implementation, the amount of tests was small and we could just cut-and-paste the test report to a file used as the input of out in-house HTML generator. Now, the amount of tests increased and cutting-and-pasting the report become a pain.
So the question: How can we send the test report to a separated file? We used
unit_test_log::instance().set_log_stream( stream )
in the definition of
test_suite* init_unit_test_suite( int argc, char* argv[] )
to redirect the test log and it worked fine. However,
unit_test_result::instance().detailed_report( stream )
can not be used in the same way. We can not simply redirect the test output to a file (using ">") because our application prints lots of information during execution and is pretty hard to change this behavior.
Did you try to redirect only stderr using 2 > file_name? If it still unacceptable you could patch unit_test_main.cpp locally. I will consider adding this customization for next release. Gennadiy.