私たちは、Mavenの統合テスト段階のライフサイクルについて数百のテストを定義しています。mavenの統合テストターゲットで個別テストを実行する方法
私がやりたいことは、integration-test
で1回のテストを実行することです。私はやってみた:
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>
.....
私はちょうど私のプロジェクトでこれをやったし、それが働きました。あなたはポムから確信しているplugingセクションを投稿できますか? –
。しかし、それはその要点です。 – Jalpesh