Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Jul 24, 2015 · 5 comments
Closed

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

GoogleCodeExporter opened this issue Jul 24, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

Changed to high priority.

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

  • Added labels: Priority-High
  • Removed labels: Priority-Low

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Is it available in latest release of gtest.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant