由于UNKNOWN_ERROR ---坑插入IntelliJ IDE的覆盖范围生成器奴才异常退出

发布于 2025-01-24 15:38:53 字数 3114 浏览 0 评论 0原文

我遇到了这个错误,使用IntellijIde中的PIT工具插件来简单程序,我正在使用Maven,也正在使用Junit4。导致错误的问题是什么,我该如何解决?

11:44:53 AM PIT >> INFO : Incremental analysis reduced number of mutations by 0
11:44:53 AM PIT >> INFO : Created  1 mutation test units in pre scan
11:44:54 AM PIT >> INFO : Sending 2 test classes to minion
11:44:54 AM PIT >> INFO : Sent tests to minion
11:44:54 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2240
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
    at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:106)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:52)
    at org.pitest.mutationtest.tooling.MutationCoverage.runAnalysis(MutationCoverage.java:149)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:139)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:123)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:54)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:98)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
    at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:148)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:90)
    ... 7 more```
  
  __________________
  

I got this error, using the plugin of PIT tool in IntelliJ IDE for a simple program, I am using maven, also I am using Junit4. What is going wrong that is causing the error and how can I solve it?

11:44:53 AM PIT >> INFO : Incremental analysis reduced number of mutations by 0
11:44:53 AM PIT >> INFO : Created  1 mutation test units in pre scan
11:44:54 AM PIT >> INFO : Sending 2 test classes to minion
11:44:54 AM PIT >> INFO : Sent tests to minion
11:44:54 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2240
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
    at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:106)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:52)
    at org.pitest.mutationtest.tooling.MutationCoverage.runAnalysis(MutationCoverage.java:149)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:139)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:123)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:54)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:98)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
 1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
    at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:148)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:90)
    ... 7 more```
  
  __________________
  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

裂开嘴轻声笑有多痛 2025-01-31 15:38:53

在无处不在的解决方案之后,我发现最新版本的PIT仅与Junit5一起使用。因此,如果您使用的是Maven,我通过迁移到Junit5来解决它

,请在POM文件中添加以下行:

<properties>
        <junit.jupiter.version>5.8.1</junit.jupiter.version>
        <junit.platform.version>1.8.1</junit.platform.version>
      </properties>
      
      <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

After looking for everywhere a solution, I found that the latest version of PIT only works with Junit5. So, I solved it by migrating to JUnit5

if you are using maven, add the following lines to your pom file:

<properties>
        <junit.jupiter.version>5.8.1</junit.jupiter.version>
        <junit.platform.version>1.8.1</junit.platform.version>
      </properties>
      
      <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文