Skip to content

Feature/jacoco coverage#137

Merged
jnioche merged 3 commits intoDigitalPebble:mainfrom
davide954:feature/jacoco-coverage
Jan 27, 2026
Merged

Feature/jacoco coverage#137
jnioche merged 3 commits intoDigitalPebble:mainfrom
davide954:feature/jacoco-coverage

Conversation

@davide954
Copy link
Contributor

@davide954 davide954 commented Jan 27, 2026

This PR adds the JaCoCo Maven plugin to generate code coverage reports during the build process(Fixes #136)

Changes

  • Added jacoco-maven-plugin to pom.xml.
  • Configured execution to automatically generate reports after tests.

How to test

You can generate the coverage report by running the standard test command in your terminal:

mvn clean test

Where to check results

Once the build completes successfully, the report is generated in target directory.

  • Open the file target/site/jacoco/index.html in your browser as localhost.
  • You will see a breakdown of code coverage per package/class (green bars indicate covered code, red indicates missed branches).

Copy link
Member

@jnioche jnioche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add to the description of the PR an explanation on how this is used from the console, where to check the results etc...?

Not everyone is familiar with JaCoCo so this could be useful

Thanks @davide954

@jnioche jnioche added this to the 0.9 milestone Jan 27, 2026
@jnioche jnioche added the enhancement New feature or request label Jan 27, 2026
@davide954
Copy link
Contributor Author

davide954 commented Jan 27, 2026

I've set the threshold to 0.60 as the current instruction coverage is 60%. This ensures that future PRs won't decrease the test quality.

Let me know if the description of the PR looks good.

@jnioche jnioche merged commit 10960e5 into DigitalPebble:main Jan 27, 2026
2 checks passed
@jnioche
Copy link
Member

jnioche commented Jan 27, 2026

Thanks @davide954

@davide954 davide954 deleted the feature/jacoco-coverage branch January 27, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test code coverage with Jacoco

2 participants