micrometer
micrometer copied to clipboard
Add jacoco to the build
JaCoCo is a Java Code Coverage library that we can add to the project so that we can track code coverage when we write tests to see if we are missing anything we wanted to cover.
Goals:
- Generating code coverage for those subprojects that are published and has tests (e.g.: bom, benckmarks, samples do not need coverage)
- Generate code coverage for
testtasks (e.g.:shenandoahTest,zgcTest,dockerTestetc. are not needed to be included) - Generating an aggregated report (all the reports merged together) in the root project
- Introducing JaCoCo in a way that it has minimal impact to the build (see non-goals)
Non-Goals:
- Addig jacoco report generation to the
buildlifecycle is not needed, this means you need to explicitly ask for coverage report (i.e.:./gradlew jacocoTestReport) - Publishing coverage reports and coverage verifications are not needed
- Recording execution data while executing tests is ok
I needed to revert this change because I think it broke the build:
- 1.6 and 1.7 were ok
- 1.8 was failing (it seems some timing issue)
- main (1.9) was ok
- 2.0 was failing but with a different error than 1.8
- locally everything was ok
I don't recall any internal discussions about this so maybe let's close it for now and come back to it if we ever need it?