0

我对 jacoco 报告有疑问...我添加到 pom.xml 文件中

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.7.7.201606060606</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>report</goal>
            </goals>
        </execution>
    </executions>
</plugin>

我什至有像 [here][1] 这样的代码,但我得到了 0% 的测试覆盖率,我什至没有 target/jacoco.exec 文件。我尝试了很多“教程”,但它仍然不起作用,我感到无能为力......

我正在使用 Intelijj IDEA Ultimate 2021.1.2,java 11 [1]:https ://www.baeldung.com/jacoco

4

0 回答 0