You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Java 17迁移后Jenkins运行Pitest突变测试遇Kill ratio NaN%问题

Java 11迁移至17后Jenkins上Pitest突变测试报告显示Kill ratio为NaN%的问题

将Java版本从11升级到17后,在Jenkins上运行Pitest突变测试时出现异常:Jenkins的Pitest报告显示Kill ratio为NaN% (0 0),但控制台输出的测试数据完全正常,且本地环境下target文件夹能正常生成包含覆盖率的HTML报告。

已尝试的依赖版本组合

所有组合均搭配Jenkins pitmutation插件1.0-18,具体如下:

  • pitest-maven:1.11.0、pitest-junit5-plugin:1.1.2
  • pitest-maven:1.14.2、pitest-junit5-plugin:1.2.0
  • pitest-maven:1.13.2、pitest-junit5-plugin:1.0.0

尝试以上组合后问题仍未解决。

当前使用的pitest-maven插件配置

<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.11.0</version>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.1.2</version>
</dependency>
</dependencies>
<configuration>
<argLine>
--add-opens java.base/java.lang=ALL-UNNAMED
</argLine> 
</configuration> 
</plugin>

Jenkins控制台输出的测试数据

2023-07-17 14:56:31.635  >> Line Coverage: 858/1021 (84%)
2023-07-17 14:56:31.635  >> Generated 280 mutations Killed 203 (73%)
2023-07-17 14:56:31.635  >> Mutations with no coverage 52. Test strength 89%
2023-07-17 14:56:31.635  >> Ran 251 tests (0.9 tests per mutation)
2023-07-17 14:56:31.635  Enhanced functionality available at https://www.arcmutate.com/

内容的提问来源于stack exchange,提问作者Nisarg Bhagavantanavar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 01:18:21