How to run all tests in a particular package with Maven?

后端 未结 9 1536
别跟我提以往
别跟我提以往 2021-01-30 02:18

I can find in the Maven docs where it shows how to run:

  1. A single test
  2. All tests in a single test class
  3. All tests in classes matching a particular
9条回答
  •  时光说笑
    2021-01-30 02:40

    You can mention packages in your pom.xml through Surefire-plugin

    
                org.apache.maven.plugins
                maven-surefire-plugin
                2.19.1
                
                    
                        com.mycom.mydep.mypak.*, com.mycom.mydep.mypak2.*
                    
                
            
    

    Please note that JUnit version should be greater than 4.8. and version of surefire should be 2.19.1 Find more details here

提交回复
热议问题