[TIP] skipped testcases not reported in JUnit XML

Pere Martir pere.martir4 at gmail.com
Sat Mar 19 05:34:57 PDT 2011


I am not sure if this is expected or included in the "standard" of
JUnit XML because I cannot find the latest documentation of JUnit XML
schema.

I use imperative skip (pytest.skip) to skip some testcases but they
are not reported in the generated JUnit XML. I want not only the
number of skipped testcases but also their names and message
explaining why they are skipped.

For example:

<testsuite total="1" skipped="1">
<testcase name="testIgnorable>
<skipped message="reason"/>
</testcase>
</testsuite>

(quoted from http://jira.codehaus.org/browse/SUREFIRE-303)

I find a sample JUnit XML using <skipped/> node here:

Bug 276068 - [JUnit] JUnit viewer doesn't recognise <skipped/> node
https://bugs.eclipse.org/bugs/show_bug.cgi?id=276068

  <testcase time="0"
classname="org.apache.abdera.protocol.server.test.filesystem.FilesystemTest"
name="org.apache.abdera.protocol.server.test.filesystem.FilesystemTest">
    <skipped/>
  </testcase>



More information about the testing-in-python mailing list