maven
官方文档: https://maven.apache.org/surefire/maven-surefire-plugin/usage.html
maven是通过插件 maven-surefire-plugin
来执行单元测试
指定test文件的之间的执行顺序
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<runOrder>alphabetical</runOrder><!-- 按文件字母顺序排序 -->
</configuration>
</plugin>
并行执行ut
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
<!-- <forkCount>1</forkCount>-->
<!-- <parallel>none</parallel>< 禁用并行执行-->
</configuration>
</plugin>