[ https://jira.codehaus.org/browse/SUREFIRE-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283030#comment-283030 ]
nkeywal commented on SUREFIRE-329: ---------------------------------- I tested the branch SUREFIRE329 above on Apache HBase, mainly in forkMode=always or forkMode=once, with JUnit 4.8.2, and I have been able to make it work with some modifications on surefire. I attach the patch here if you want to reuse some elements. The issues I had are: 1) logs on console despite a redirect setting 2) excludedGroups was not taken into account, it seems that there is a confusion between excludedgroups & excludegroups (see the missing 'd') 3) the filtering was not done I also had an issue linked to JUnit: JUnit fully initializes the classes to check if it must be included or not. It means creating the static variable & so on. If the initialization is not possible for any reason (for example complex initialization dependent on the class loader) it breaks... I created an issue in JUnit for that: https://github.com/KentBeck/junit/issues/359. It works fine with a minor modification on JUnit. We need it for HBase, it won't be necessary for everybody I think. Using forkMode=once, with only excludedGroups (no groups specify) does not work (junit exception). I didn't dig in this one as in our case forkMode=once without groups is barely used. It could be a pure JUnit issue. > Support for JUNIT extensions > ---------------------------- > > Key: SUREFIRE-329 > URL: https://jira.codehaus.org/browse/SUREFIRE-329 > Project: Maven Surefire > Issue Type: Wish > Components: Junit 4.x support > Reporter: Anuj Kathuria > Assignee: Kristian Rosenvold > Fix For: Backlog > > Attachments: surefire-329.txt, surefire-329.txt > > > Is there any plan to support using JUNIT extensions such as > @Category,@PreRequisite with Maven2 SureFire plugin? > The JUNIT EXTENSION URL: > http://www.junitext.org/ > We would like to specify the categories to run via a configurable option in > the maven surefire plugin that supports JUNIT extensions > See example Java Code: The following runs only tests with Category - Z. > //In JUnit4 > JUnitCore core = new JUnitCore(); > // use for categories special listener, give some statistics > core.addListener(new CategoryTextListener(System.out)); > Request req = Request.aClass(SpcfXXXXTest.class); > core.run(req.filterWith(new CategoryFilter("Z"))); -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira