Skip to content

jacoco does not produce code coverage reports #1

@acrandal

Description

@acrandal

Hello - I have been looking for a working example of how to generate code coverage reports with JUnit5 for quite a while, and was excited to give this Junit5Examples repo a try. Unfortunately, it does not generate reports after following the steps outlined in your howto guide.

Repository cloned with no file edits.

Java version: Openjdk version "21.0.1" 2023-10-17
Maven version: Apache Maven 3.6.3

Execution of "mvn package" runs to completion and all tests pass, but the dreaded non descriptive error for jacoco pops up. I've never been able to resolve this on any computer I've used, no matter java or maven configurations. Any insights or suggestions on how to fix it would be wonderfully welcomed:

[INFO] --- jacoco-maven-plugin:0.8.7:report (default-report) @ JUnit5Examples ---
[INFO] Skipping JaCoCo execution due to missing execution data file.

The surefire-reports directory is made in target/surefire-reports with plenty of .txt and .xml files, but no jacoco target/site directory for the code coverage output is generated.

Screenshot of end of mvn package run and system information:

jacocoNotRunning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions