You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nkeywal (JIRA)" <ji...@codehaus.org> on 2011/11/10 10:58:51 UTC
[jira] Created: (SUREFIRE-786) JUnit @Category are not taken into
account if forkMode=always
JUnit @Category are not taken into account if forkMode=always
-------------------------------------------------------------
Key: SUREFIRE-786
URL: https://jira.codehaus.org/browse/SUREFIRE-786
Project: Maven Surefire
Issue Type: Bug
Affects Versions: 2.11
Reporter: nkeywal
Attachments: JUnit48TestCategoriesForkIT.java
Selection by groups works if forkMode=once or none. Whith forkMode=always, it seems that all tests are executed.
See attachment for a test case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-786) JUnit @Category are not taken into
account if forkMode=always
Posted by "nkeywal (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nkeywal updated SUREFIRE-786:
-----------------------------
Attachment: surefire786_trunk.patch
The patch fixes the issue for the classes. Only the needed class tests will be executed.
This do not cover the case when only a subset of tests should be executed. It seems that the filters are lost during the fork when forkMode=always (while it works for forkMode=once). For us, as we use tags on classes and all classes are tagged, it's enough anyway.
> JUnit @Category are not taken into account if forkMode=always
> -------------------------------------------------------------
>
> Key: SUREFIRE-786
> URL: https://jira.codehaus.org/browse/SUREFIRE-786
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.11
> Reporter: nkeywal
> Attachments: JUnit48TestCategoriesForkIT.java, surefire786_trunk.patch
>
>
> Selection by groups works if forkMode=once or none. Whith forkMode=always, it seems that all tests are executed.
> See attachment for a test case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (SUREFIRE-786) JUnit @Category are not taken into
account if forkMode=always
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed SUREFIRE-786.
---------------------------------------
Resolution: Fixed
Assignee: Kristian Rosenvold
Fixed in r1200541, thanks a lot for the patch!
I added support & testcase for "methods" too, and these are now also respected inside the fork, which was a long-standing serious bug
> JUnit @Category are not taken into account if forkMode=always
> -------------------------------------------------------------
>
> Key: SUREFIRE-786
> URL: https://jira.codehaus.org/browse/SUREFIRE-786
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.11
> Reporter: nkeywal
> Assignee: Kristian Rosenvold
> Attachments: JUnit48TestCategoriesForkIT.java, surefire786_trunk.patch
>
>
> Selection by groups works if forkMode=once or none. Whith forkMode=always, it seems that all tests are executed.
> See attachment for a test case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (SUREFIRE-786) JUnit @Category are not
taken into account if forkMode=always
Posted by "nkeywal (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283206#comment-283206 ]
nkeywal edited comment on SUREFIRE-786 at 11/10/11 8:28 AM:
------------------------------------------------------------
The patch fixes the issue for the classes. Only the needed class tests will be executed.
This do not cover the case when only a subset of test methods should be executed within a class test: all methods will be executed. It seems that the filters are lost during the fork when forkMode=always (while it works with forkMode=once). For us, as we use tags on classes and all classes are tagged, it's enough anyway.
was (Author: nkeywal):
The patch fixes the issue for the classes. Only the needed class tests will be executed.
This do not cover the case when only a subset of tests should be executed. It seems that the filters are lost during the fork when forkMode=always (while it works for forkMode=once). For us, as we use tags on classes and all classes are tagged, it's enough anyway.
> JUnit @Category are not taken into account if forkMode=always
> -------------------------------------------------------------
>
> Key: SUREFIRE-786
> URL: https://jira.codehaus.org/browse/SUREFIRE-786
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.11
> Reporter: nkeywal
> Attachments: JUnit48TestCategoriesForkIT.java, surefire786_trunk.patch
>
>
> Selection by groups works if forkMode=once or none. Whith forkMode=always, it seems that all tests are executed.
> See attachment for a test case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-786) JUnit @Category are not taken into
account if forkMode=always
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold updated SUREFIRE-786:
----------------------------------------
Fix Version/s: 2.11
> JUnit @Category are not taken into account if forkMode=always
> -------------------------------------------------------------
>
> Key: SUREFIRE-786
> URL: https://jira.codehaus.org/browse/SUREFIRE-786
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.11
> Reporter: nkeywal
> Assignee: Kristian Rosenvold
> Fix For: 2.11
>
> Attachments: JUnit48TestCategoriesForkIT.java, surefire786_trunk.patch
>
>
> Selection by groups works if forkMode=once or none. Whith forkMode=always, it seems that all tests are executed.
> See attachment for a test case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira