我正在尝试生成 PIT 测试覆盖率报告,我需要排除某个包。这些是使用的配置:
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.3.0</version>
<configuration>
<targetClasses>
<param>test.presentation.*</param>
<param>test.service.impl.*</param>
</targetClasses>
<targetTests>
<param>test.App.ServletInitializerTest</param>
<param>test.presentation.AuthenticationControllerTest</param>
<param>test.service.impl.AuthenticationServiceImplTest</param>
</targetTests>
<excludedClasses>
<param>test.security.AuthenticationSecurityServiceImpl</param>
<param>test.security.TokenAuthenticationFilter</param>
<param>test.security.TokenInfo</param>
<param>test.security.TokenManagerImpl</param>
</excludedClasses>
<excludedTestClasses>
<param>test.security.AuthenticationSecurityServiceImplTest</param>
</excludedTestClasses>
<excludedMethods>
<param>test.service.impl.AuthenticationServiceImpl.userAuthentication</param>
</excludedMethods>
<avoidCallsTo>
<avoidCallsTo>test.service.impl.AuthenticationServiceImpl</avoidCallsTo>
<avoidCallsTo>test.security.*</avoidCallsTo>
</avoidCallsTo>
</configuration>
</plugin>
但我的报告仍然显示 test.security.* 包和 test.service.impl.AuthenticationServiceImpl.userAuthentication 方法的覆盖率。
如何在覆盖率报告中跳过这个包和方法?