Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.11
-
Component/s: Junit 4.x support
-
Labels:None
-
Complexity:Intermediate
Description
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")));
Issue Links
- is related to
-
SUREFIRE-786
JUnit @Category are not taken into account if forkMode=always
-
- relates to
-
SUREFIRE-656
JUnit 4.8 @Category support
-
Does anyone know if there is a workaround to this at the moment? I am a bit surprised this issue only got 3 votes, as JUnit is quite popular. Also, Maven has poor support for functional/integration tests at the moment: if surefire had a way to harness junit categories, it would help quite a bit in organizing unit and integration tests within Maven.