You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl M. Davis (JIRA)" <ji...@codehaus.org> on 2009/03/27 19:00:13 UTC
[jira] Created: (SUREFIRE-542) JUnit 4.4 tests skipped for a failed
assumption are not reported as "Skipped"
JUnit 4.4 tests skipped for a failed assumption are not reported as "Skipped"
-----------------------------------------------------------------------------
Key: SUREFIRE-542
URL: http://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
Priority: Minor
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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-542) JUnit 4.4 tests skipped for a failed
assumption are not reported as "Skipped"
Posted by "Karl M. Davis (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Updated: (SUREFIRE-542) JUnit 4.4 tests skipped for a failed
assumption are not reported as "Skipped"
Posted by "Stefan Birkner (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Birkner updated SUREFIRE-542:
------------------------------------
Attachment: SUREFIRE-542.patch
This bug fix adds the method testAssumptionFailure to the JUnit4TestSetReporter
> JUnit 4.4 tests skipped for a failed assumption are not reported as "Skipped"
> -----------------------------------------------------------------------------
>
> Key: SUREFIRE-542
> URL: http://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
> Priority: Minor
> 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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (SUREFIRE-542) JUnit 4.4 tests skipped for a failed
assumption are not reported as "Skipped"
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed SUREFIRE-542.
---------------------------------------
Resolution: Fixed
Fix Version/s: 2.7.2
Assignee: Kristian Rosenvold
Fixed in r1058166
> JUnit 4.4 tests skipped for a failed assumption are not reported as "Skipped"
> -----------------------------------------------------------------------------
>
> Key: SUREFIRE-542
> URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira