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

后端 未结 9 1711
别跟我提以往
别跟我提以往 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:53

    Had the same problem (how to run all tests in a particular package) and tried many ways, two commands that worked were:

    mvn -Dtest=com.package.my.package.** test
    
    mvn -Dtest=com.package.my.package.**.* test
    

提交回复
热议问题