【发布时间】:2018-08-02 11:48:17
【问题描述】:
是否可以根据@Tag更改测试执行的顺序?我想让所有标有@Tag("fast") 的测试在@Tag("slow") 之前执行。
我对 IntelliJ IDEA 和 Maven 的解决方案感兴趣。两者都不关心标签的配置顺序。
我的 Maven 配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
<configuration>
<properties>
<includeTags>fast,slow</includeTags>
</properties>
</configuration>
</plugin>
我想我最好的选择是单独运行这些套件。
【问题讨论】: