tl;dr - A proposal for config independence for groups/excludeGroups
properties and some special keywords for ALL, NONE, and UNCATEGORIZED
groups.
***
In the Apache Accumulo project, we're currently in process of trying to
make use of JUnit categories to separate different classes of tests.
So, we're using the maven-surefire-plugin and maven-failsafe-plugin
configuration properties: groups, excludeGroups
One thing we noticed was that the user property is the same for both
plugins. This is a problem, because one cannot pass in a system property on
the command-line to affect one without affecting the other.
I propose that maven-surefire-plugin and maven-failsafe-plugin deprecate
the existing groups/excludeGroups properties, and replace them with
tests.groups/tests.excludeGroups, and it.groups/it.excludeGroups. (This
should probably be done for other shared properties as well.)
Users can simulate this by doing something like this:
<groups>${it.groups}</groups>
However, this may cause problems if the property is not defined.... I
haven't tested to be sure.
***
That leads me to a question and a second proposal:
Is there a way to specify uncategorized test classes? Or all test classes?
Or none?
If not, I would like to propose that some special keywords be created which
can represent:
_ALL_, _NONE_, _UNCATEGORIZED_ (or similar)
That way, users can do things like:
<groups>my.special.Category,_UNCATEGORIZED_</groups><!-- logical AND -->
<excludeGroups>_NONE_</excludeGroups>
or
<groups>_NONE_</groups>
or
<groups>_ALL_</groups>
These keywords may require some support from the underlying test framework,
like JUnit, so I can understand if these keywords cannot happen.
Even if the keywords cannot be made to work, I still think it'd be good to
deprecate-and-separate the properties for the two plugins, so they can be
controlled independently with user properties.
Thanks.