It finally seems like the Surefire plugin does handle categories.
Please read this link, it show how to simplify your setup. http://johndobie.blogspot.com/2012/04/unit-and-integration-tests-with-maven.html
Since the 4.8 version
Hope this will ease the implementation of using test-grouping
|Thanks to David Saff for helping us reach this solution.|
Example for slow tests:
The Challenge: "@Suite.SuiteClasses" need to specify which classes to be included.
What we want is to run all tests that has a given category. This challenge will be solved
by using ClasspathSuite extension to JUnit
|Test annotations on class level includes all test-methods in the class.|
If you add to your test class definition, all test-methods in that class
will be run by the SlowTests category. This will happen even if the method only is marked with the FastTests category.