Hi All,

I have noticed that the JUnit XML reports generated by Gradle are not being
correctly parsed by Jenkins and other applications when a test is skipped.
This is in relation to http://issues.gradle.org/browse/GRADLE-2731. From
what I can find out there is no 'standard' format that these reports
produce, however Ant and Maven(at least) have standardised on the format
described in the issue and the linked StackOverflow
post<http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports>
.

So when a test is skipped in Gradle it produces(for example):
<testsuite name="com.foo.FooTest" tests="1" failures="0" errors="0"
timestamp="2012-11-19T17:09:28" hostname="localhost" time="0.045">
  <ignored-testcase name="some skipped test" classname="com.foo.FooTest"
time="0.01"/>
  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[]]></system-err>
</testsuite>

However when Ant runs the same test(changes highlighted):
<testsuite name="com.foo.FooTest" tests="1"*skipped="1"* failures="0"
errors="0" timestamp="2012-11-19T17:09:28" hostname="localhost"
time="0.045">
  <*testcase* name="some skipped test" classname="com.foo.FooTest"
time="0.01">
    *<skipped/>*
  </testcase>
  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[]]></system-err>
</testsuite>

Ant generates a normal testcase tag and adds a child element; and Ant also
generates a skipped attribute. This is compared to the ignored-testcase.

The only concern that I have with changing this output would be any tool
that has changed to only support the Gradle format.

I am writing a fix for this so is there anything that I have missed or
overlooked in the above.

I hope that I can help out,

Lee

Reply via email to