iveney / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Need to generate XML report in JUnit's format #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Google Test's XML report format differs from JUnit's slightly.  While we
cannot change it without breaking some existing processes, a quick
short-term solution is to write an XSLT to convert
Google Test's output to JUnit's format (it's also very flexible in
case JUnit changes its format).  In the long run, we could extend the
--gtest_output flag with an option to use the JUnit format, e.g.

 --gtest_output=junit_xml

instead of

 --gtest_output=xml

This will be more work to implement but is easier for the users.

Original issue reported on code.google.com by shiq...@gmail.com on 8 Sep 2008 at 7:20

GoogleCodeExporter commented 9 years ago
I'd like to request a higher priority on this issue.  We (and many others) are 
using
Continuous Integration systems that all have mechanisms for parsing JUnit and 
in some
cases CppUnit XML results.  Right now, Google Test is not an alternative for 
these
people because of the lack of reporting in a standard way.

Original comment by bill.wa...@gmail.com on 16 Sep 2008 at 5:01

GoogleCodeExporter commented 9 years ago
Changed to high priority.

Original comment by shiq...@gmail.com on 17 Sep 2008 at 6:55

GoogleCodeExporter commented 9 years ago
balazs.dan@gmail.com reported:

<quote>
I've tried gtest with Cruise Control and seems xml output of gtest is
a bit different than CC expects.

CC expects this format:
<testsuite name="AllTests" ...>
 <testsuite name="test_case_name" ...>
   <testcase name="test_name" ...>
     <failure ...>Error message</failure>
   </testcase>
 </testsuite>
</testsuite>

But gtest uses this:
<testsuite name="AllTests" ...>
 <testsuite name="test_case_name" ...>
   <testcase name="test_name" ...>
     <failure message="Error message"/>
   </testcase>
 </testsuite>
</testsuite>

The difference is the placement of the "message". Because of this
difference CC can't display the error message.
You have to know, CC works very well with JUnit, so seems junit xml
output and gtest xml output is a bit different..
</quote>

Also, I heard report that in JUnit's output the time unit is second (e.g. 2.3), 
while 
Google Test uses millisecond (e.g. 2300).

Original comment by shiq...@gmail.com on 19 Sep 2008 at 5:56

GoogleCodeExporter commented 9 years ago
Google Test's XML output format has been changed to match JUnit/Ant's in the 
trunk.

Original comment by shiq...@gmail.com on 26 Sep 2008 at 4:12

GoogleCodeExporter commented 9 years ago
Is it available in latest release of gtest.

Original comment by anubh...@gmail.com on 25 Aug 2009 at 11:29