Setup code coverage tool#1211
Merged
LikeTheSalad merged 1 commit intoopen-telemetry:mainfrom Sep 11, 2025
Merged
Conversation
Contributor
|
Having coverage is great! I think we'd want to be conservative about gating builds on it, but we definitely use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 atbuild/reports/kover/html.If there was desire to setup code coverage tracking it would be possible to create an XML report using
./gradlew koverXmlReportand 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.