Skip to content

Conversation

fractalwrench
Copy link
Member

Goal

Whilst code coverage isn't a perfect metric it is a useful tool for highlighting when parts of a codebase are missing tests entirely. Kover provides code coverage reports for both Kotlin/Java source code and allows generating either a HTML or XML file.

In this changeset I've applied Kover to all production modules and created an aggregate report that can be accessed with ./gradlew koverHtmlReport. This report produces a HTML file that can be accessed at build/reports/kover/html.

If there was desire to setup code coverage tracking it would be possible to create an XML report using ./gradlew koverXmlReport and upload it to a service such as codecov (what we use at Embrace). For now I feel it's just useful having this as an option to highlight code coverage locally rather than tracking things continuously.

@fractalwrench fractalwrench requested a review from a team as a code owner September 9, 2025 12:35
@breedx-splk
Copy link
Contributor

Having coverage is great! I think we'd want to be conservative about gating builds on it, but we definitely use codecov in the java core repo for PRs to help ensure that coverage isn't significantly declining (here's an example) and I think it's nice to demonstrate project maturity by having a badge on the main readme (like java core does). 🤘🏻

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

Love it!

Copy link
Contributor

@LikeTheSalad LikeTheSalad left a comment

Choose a reason for hiding this comment

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

Thank you!

@LikeTheSalad LikeTheSalad merged commit 5774d7c into open-telemetry:main Sep 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants