maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl M. Davis (JIRA)" <j...@codehaus.org>
Subject [jira] (SUREFIRE-542) JUnit 4.4 tests skipped for a failed assumption are not reported as "Skipped"
Date Wed, 07 Mar 2012 21:08:02 GMT

    [ https://jira.codehaus.org/browse/SUREFIRE-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=293596#comment-293596
] 

Karl M. Davis commented on SUREFIRE-542:
----------------------------------------

Please note that, in order for JUnit assumptions to work as intended, your tests must be JUnit
4-style, e.g. not extend from {{TestCase}} and instead use {{@Test}} annotations. This is
obvious in retrospect, but I just blew an hour or so figuring it out. Hope it saves someone
else time.
                
> JUnit 4.4 tests skipped for a failed assumption are not reported as "Skipped"
> -----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-542
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-542
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.4.3
>         Environment: 64 bit Ubuntu 8.10, OpenJDK 6
>            Reporter: Karl M. Davis
>            Assignee: Kristian Rosenvold
>            Priority: Minor
>             Fix For: 2.7.2
>
>         Attachments: SUREFIRE-542.patch
>
>
> Junit 4.4 has support for ignoring tests at runtime via code like the following:
> {{Assume.assumeTrue(testsShouldBeRun());}}
> When running tests under Surefire that fail their assumptions, the tests are reported
as successful-- not ignored as they ought to be.  The javadoc for the Assume class is here:
[http://junit.org/apidocs/org/junit/Assume.html].

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message