When using the maven-surefire-plugin and both includes and excludes, which order are they processed in? Furthermore, if you have 3 sets of tests, the first being the base s
I couldn't find official documentation about surefire plugin, but indeed the exclude-override-include is a common approach and is also applied by Maven in other similar contexts, like for resources.
The only official an related info (I found) comes from the official Maven POM Reference documentation, here:
includes: A set of files patterns which specify the files to include as resources under that specified directory, using * as a wildcard.
excludes: The same structure as includes, but specifies which files to ignore. In conflicts between include and exclude, exclude wins.
NOTE: I added the final bold formatting on the interesting statement.
So more than probably the same approach is used across official maven plugins (in general, all the plugins having the org.apache.maven.plugins groupId and maven- prefix as artifactId).
Have you tried using JUnit categories?
http://www.agile-engineering.net/2012/04/unit-and-integration-tests-with-maven.html
Using that approach, you could give tests a number of different categories, and exclude/include them using that, rather than the class name. This would be a more extensible approach.