Maven surefire has
- JUnit4 Runner http://maven.apache.org/surefire/surefire-providers/surefire-junit4/index.html
- JUnitCore Runner http://maven.apache.org/surefire/surefire-providers/surefire-junit47/index.html
What is the difference between them?
I notice, that property excludedGroups work in surefire-junit47, but doesn't work in surefire-junit4 Why?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.18</version>
</dependency>
</dependencies>
<configuration>
<excludedGroups>my.com.IntegrationDB</excludedGroups>
</configuration>
</plugin>
First i wouldn't defined the surefire-junitXXX manually. Better let surefire do it's job. Furthermore an excerpt from the docs:
See also for groups:
http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories