[test] Generate xml from unit tests

Hi, I would like to generate xml output from my test. The boost libraries seem to have an executable that converts the test output to xml. Is there a way to do it directly from the testing library? Chris

"Chris Weed"
Hi, I would like to generate xml output from my test. The boost libraries seem to have an executable that converts the test output to xml.
What executable do you mean?
Is there a way to do it directly from the testing library?
Boost.Test based unit test has an ability to format an output in XML. Use --output_format=XML or --report_format=XML --log_format=XML separately. Gennadiy

On 9/13/06, Gennadiy Rozental
"Chris Weed"
wrote in message news:359e4bf50609130926j23a8842ep62795596f06ee411@mail.gmail.com... Hi, I would like to generate xml output from my test. The boost libraries seem to have an executable that converts the test output to xml.
What executable do you mean?
Thanks, I was looking at boost_1_33_1/tools/regression/process_jam_log.cpp I wanted to generate regression web pages for my project like boost does. I will try the output formatter. Chris

Boost.Test based unit test has an ability to format an output in XML. Use --output_format=XML or --report_format=XML --log_format=XML
separately.
Gennadiy
I tried the following test with bjam -d0, which outputs the xml to std::cout.
However, it also outputs the following message:
*** No errors detected
How do I turn this message off?
Chris
// Test
#include

"Chris Weed"
Boost.Test based unit test has an ability to format an output in XML. Use --output_format=XML or --report_format=XML --log_format=XML
separately.
Gennadiy
I tried the following test with bjam -d0, which outputs the xml to std::cout. However, it also outputs the following message: *** No errors detected
How do I turn this message off?
you could use --report_level=no
Chris
// Test
#include
#include #include using boost::unit_test::test_suite; // Test U1 static void test_U1() { BOOST_CHECK(1>0); }
test_suite* init_unit_test_suite( int, char* [] ) { boost::unit_test::unit_test_log.set_format(boost::unit_test::XML);
You did not setup report format.
boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_successful_tests); test_suite* test = BOOST_TEST_SUITE( "My tests" ); test->add( BOOST_TEST_CASE( &test_U1 ) ); return test; }
Gennadiy
participants (2)
-
Chris Weed
-
Gennadiy Rozental