You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dan Fabulich (JIRA)" <ji...@codehaus.org> on 2007/11/23 19:41:57 UTC

[jira] Updated: (SUREFIRE-303) Ignored/Skipped tests are not reported

     [ http://jira.codehaus.org/browse/SUREFIRE-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Fabulich updated SUREFIRE-303:
----------------------------------

    Affects Version/s: 2.4
        Fix Version/s:     (was: 2.4)
                       2.x

Weirdly, this seems to be way harder than it looks.

1) The JUnit team, in their infinite wisdom, decided not to provide a way for external test runners like Maven, Ant, Eclipse, etc. to know the reason why a test was ignored.  Try running your test in any runner; none of them will report the reason.  That's because RunListener.testIgnored only gives you a Description [e.g. "myMethod(MyClass)"] but no reason; similarly, RunNotifier provides no way for runners to pass a reason to listeners.

2) I can't find *any* JUnit XML output anywhere that even lists out which tests were ignored!  As far as I can tell, the official way to report JUnit 4 @Ignores is simply to increment the "skipped" attribute in the root element and say nothing further.

If anyone can provide an example XML file in the JUnit-style (root <testsuite> contains <testcase> elements which may contain <failure> elements) I can try to make something that looks like it, but right now there's no "correct" report to try to imitate.

> Ignored/Skipped tests are not reported
> --------------------------------------
>
>                 Key: SUREFIRE-303
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-303
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.x support, report plugin, xml generation
>    Affects Versions: 2.3, 2.4
>            Reporter: Daniel Kulp
>             Fix For: 2.x
>
>
> Tests that are skipped with a @Ignore("Test doesn't work") annotation only appear in the report as an increment in the "Skipped" column.    Neither the names of the skipped tests nor the text/reason for the skip appear at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira