- main-app
- main-app-mutation-test
- main-app-integration-test
- main-app-acceptance-test
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.4.10-DUMMY-SNAPSHOT</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>mutationCoverage</goal>
</goals>
<configuration>
<targetClasses>
<targetClass>com.dummy.*</targetClass>
</targetClasses>
<outputFormats>
<outputFormat>HTML</outputFormat>
</outputFormats>
<mutationThreshold>99</mutationThreshold>
<coverageThreshold>99</coverageThreshold>
<detectInlinedCode>true</detectInlinedCode>
<threads>4</threads>
<timestampedReports>false</timestampedReports>
<skip>false</skip>
<skipTests>false</skipTests>
</configuration>
</execution>
</executions>
</plugin>
当我们运行pitest插件时,出现以下日志并且突变测试没有运行:
[INFO] 跳过项目,因为:
[INFO] - 项目没有测试,它是空的。
我希望'targetClasses'的值可以告诉pitest要突变测试哪些Java类。该项目还通过'maven-surefire-plugin'运行单元测试,但是找到要测试的测试和目标类没有问题。
因此我的问题是,即使它们在继承的jar文件中并且不存在于模块本身中,我们是否可以指定要突变测试的类?