XML report format

1,392 views
Skip to first unread message

Alexander Demin

unread,
Jun 30, 2009, 11:47:17 AM6/30/09
to Google C++ Testing Framework
Hi,

As it is mentioned in the documentation Google Test output XML format
is compatible with JUnit. At the moment it looks for instance like
this:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite tests="11" failures="0" disabled="0" errors="0" time="0"
name="AllTests">
<testsuite name="Cache" tests="11" failures="0" disabled="0"
errors="0" time="0">
<testcase name="BucketExists" status="run" time="0"
classname="Cache" />
...
<testcase name="ClearStats" status="run" time="0"
classname="Cache" />
</testsuite>
</testsuite>

But it's not compatible with JUnit format a bit, especially nested
'<testsuite>' tags which is generally speaking not quite right, isn't
it?

To be compatible with JUnit and to be successfully fed to Hudson, for
example, it would look like this:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://repository/xsl/junit-
doc.xsl"?>
<testsuite tests="11" failures="0" notperformed="0" errors="0"
time="0" name="com.unittest.cache">
<testcase name="BucketExists" status="run" time="0"
classname="com.unittest.cache.Cache" />
...
<testcase name="ClearStats" status="run" time="0"
classname="com.unittest.cache.Cache" />
</testsuite>

Is there any general plan to make XML reporting in GTest closer to
JUnit? I have my custom 1.3.0 version derivative changed to produce
proper JUnit XML output but I am really keen to make this patch widely
usable. So are there any plans in this direction in the official trunk
just not to re-invent a wheel?

Regards,
Alexander

housemaister

unread,
Jun 30, 2009, 2:49:12 PM6/30/09
to Alexander Demin, googletes...@googlegroups.com

Alexander Demin

unread,
Jun 30, 2009, 3:44:53 PM6/30/09
to housemaister, googletes...@googlegroups.com
Fair enough, thanks. Let's just wait for 1.3.1.

Regard,
Alexander


30.06.2009, в 19:49, housemaister <housem...@gmail.com> написал(а):

Manda Razaf'

unread,
Apr 29, 2014, 5:19:09 AM4/29/14
to googletes...@googlegroups.com, ade...@gmail.com
Hello, I am new on google test, I wrote my first test code nad it was successfull, I have also a XML output file, but to convert to the .xsl format I don't know how to begin.

Thanks for your help.  
Reply all
Reply to author
Forward
0 new messages