I'm wondering if there is a way to specify in Maven which collection of JUnit tests run based on package names. An 'exclude' would be ideal, since I have fewer that I need not run than I have those that need to run.
            Asked
            
        
        
            Active
            
        
            Viewed 135 times
        
    -1
            
            
        - 
                    possible duplicate of [Is there a way to tell surefire to skip tests in a certain package?](http://stackoverflow.com/questions/4389744/is-there-a-way-to-tell-surefire-to-skip-tests-in-a-certain-package) – Joe May 04 '14 at 09:46
 
1 Answers
1
            Yes you can configure surefire plugin to include certain tests only
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <includes>
            <include>com/abc/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html