Maven には、統合テスト フェーズのライフサイクル用に定義された数百のテストがあり、完了するまでに長い時間がかかります。
私がやりたいことは、 で 1 つのテストだけを実行することですintegration-test
。私はやってみました:
mvn -Dtest=<my-test> integration-test
しかし、それは機能しません。は-Dtest
、統合テスト フェーズではなく、単体テスト ゴールのテストのみを実行します。代わりに を試しました-Dintegration-test=<my-test>
が、無視されました。
それを行う方法はありますか?
私の構成は次のとおりです。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/api/**</include>
</includes>
.....