2019年11月19日 | Leave a comment 为加速测试时间可以配置为并行测试 配置如下: mvn -T 1C test pom.xml <project> .... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <parallel>suites</parallel> <forkCount>1C</forkCount> <useUnlimitedThreads>true</useUnlimitedThreads> </configuration> </plugin> </plugins> </build> </project> 12345678910111213141516 <project>.... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <parallel>suites</parallel> <forkCount>1C</forkCount> <useUnlimitedThreads>true</useUnlimitedThreads> </configuration> </plugin> </plugins> </build></project> 参考: http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html