JUnitカテゴリを使用して、統合テストと単体テストを分離しています。Surefireプラグインの構成は機能します-マーカーインターフェイスIntegrationTestで注釈が付けられたテストをスキップします。
ただし、Failsafeプラグインは統合テストを選択しません。junit47プロバイダーを指定しようとしましたが、統合テストフェーズでゼロテストが実行されます。
これがpom.xmlフラグメントです:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
<configuration>
<groups>com.mycompany.test.IntegrationTest</groups>
<excludedGroups>com.mycompany.test.UnitTest</excludedGroups>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12</version>
</dependency>
</dependencies>
</plugin>
ログのフェイルセーフ部分は次のとおりです。
[INFO] --- maven-failsafe-plugin:2.12:integration-test (default) @ MyProject.war ---
[INFO] Failsafe report directory: /home/stoupa/MyProject/war/target/failsafe-reports
[INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
ログ出力に表示されるプロバイダーorg.apache.maven.surefire.junitcore.JUnitCoreProviderは正しいものですか?