search

Home  >  Q&A  >  body text

java - jacoco 统计junit单元测试对项目代码的测试覆盖率为0?

大家讲道理大家讲道理2802 days ago1116

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-18 10:47:25

    I encountered the same problem. After searching for a long time, I found out that it was a version problem. My jdk is 1.8 and the plug-in uses 0.7.2. . . . . I saw you asking a question, so I registered to answer it. I hope it’s useful. Here’s how I solved it: Change the configuration version in the pom file to the latest one

                <groupId>org.jacoco</groupId>    
                <artifactId>jacoco-maven-plugin</artifactId>    
                <version>0.7.9</version>  

    reply
    0
  • Cancelreply