I tried to use junitreport but XML file content is not well recognized.
@dmeister
http://code.google.com/p/googletest/issues/detail?id=114
[...] Google Test was designed to match our internal tools which expect the XML report to match the format of those produced by the "junit" Ant task, which has "testsuite" as the root element. [...]
This is what gtest (1.6.0) generates:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="0" disabled="0" errors="0" time="0" name="AllTests">
<testsuite name="SimpleTest" tests="1" failures="0" disabled="0" errors="0" time="0">
<testcase name="Test_1" status="run" time="0" classname="SimpleTest" />
</testsuite>
</testsuites>
This is the error message returned by junitreport:
SimpleTest.xml is not a valid testsuite XML document
I did it for myself with Python 2.*: https://github.com/burlachenkok/gtest_report
Also this gtest_report supports comparision of 2 or more google test results. If to be honest it was the prime goal.
The junitreport expects file with testsuite
as root element. It than merges multiple files with a testsuite
root element together into a single report.
You can write a small helper script to split the gtest xml files into one file per testsuite
tag. And then feed this files into the junit report.
The jenkins junit reporting accepts also merged test files with testsuites
as root element. So it accepts the files generated by gtest directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With