Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4.3
-
Fix Version/s: 2.12
-
Component/s: Junit 4.x support, Maven Surefire Report Plugin, xml generation
-
Labels:None
-
Environment:Windows XP, junit 4.4
-
Complexity:Intermediate
Description
Tests that are skipped with a @Ignore("Test doesn't work") annotation only appear in the report as an increment in the "Skipped" column. Name of the skipped testcases is also reported. However, the reason (i.e. "Test doesn't work") is not reported.
Quick look at the source code, it seems that it is not implemented:
In class: org.apache.maven.plugins.surefire.report.TestSuiteXmlParser
else if ( "skipped".equals( qName ) ) { testCase.addFailure( "skipped", "skipped" ); // TODO extract real reasons currentSuite.setNumberOfSkipped( 1 + currentSuite.getNumberOfSkipped() ); }
Issue Links
- is related to
-
SUREFIRE-303
Ignored/Skipped tests are not reported
-
py.test seem to have implemented the feature in the XML report they produce by using message attribute to skipped element (like error or failure): see http://lists.idyll.org/pipermail/testing-in-python/2011-March/003930.html
this message does not seem to be supported by JENKINS, for example, see https://issues.jenkins-ci.org/browse/JENKINS-8713
but add such message attribute to actual "skipped" element generated by Surefire should not cause any harm