jacoco バージョン 0.7.1.201405082137 と maven 3.0.5 を使用するプロジェクトがあります。プロジェクトには、いくつかの単体テストと、arquillian を使用して作成されたいくつかのテストがあります。
単体テストと統合テストを区別するために、2 つの junit カテゴリを作成しました。1 つは FastTest と呼ばれ、もう 1 つは SlowTest と呼ばれます。
すべてのテストを実行するために使用する Maven プロファイルでは、次のプラグインを構成しています。
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<groups>SlowTest,FastTest</groups>
<systemPropertyVariables>
<arquillian.launch>wildfly_8_x</arquillian.launch>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
両方のカテゴリをそのままにしておくと、SlowTest で注釈が付けられたテストのカバレッジのみが得られます。しかし、すべてのテストが実行されます。FastTest で注釈が付けられたものだけを実行すると、正しいカバレッジも得られます。
両方の種類のテストを実行するときに正しいカバレッジを得るために jacoco を設定するにはどうすればよいですか?