diff --git a/doc/ci/testing/code_coverage/img/jacoco_coverage_example_v18_3.png b/doc/ci/testing/code_coverage/img/jacoco_coverage_example_v18_3.png new file mode 100644 index 0000000000000000000000000000000000000000..d2dea0767f3deaff81074a8e0687a26700e3503e Binary files /dev/null and b/doc/ci/testing/code_coverage/img/jacoco_coverage_example_v18_3.png differ diff --git a/doc/ci/testing/code_coverage/jacoco.md b/doc/ci/testing/code_coverage/jacoco.md index c50267bbf8418199be2651bb23f924eda47007ce..cac8624d4c2aa2dfa9d834f30efe7fbac871080d 100644 --- a/doc/ci/testing/code_coverage/jacoco.md +++ b/doc/ci/testing/code_coverage/jacoco.md @@ -29,6 +29,26 @@ The JaCoCo coverage reports visualization supports: - [Instructions (C0 Coverage)](https://www.eclemma.org/jacoco/trunk/doc/counters.html), `ci` (covered instructions) in reports. +Coverage displays in the diff view as follows: + +- `Instructions covered` (green): reported lines with at least one covered instruction (ci > 0). +- `No instructions covered` (red): reported lines without any covered instructions (ci = 0). +- No coverage information: lines which are not listed in the report. + +For example, with report output: + +```xml + + + + + +``` + +The merge request diff view would look like: + +![Jacoco coverage report showing uncovered code (red bars) on lines 83-86, covered code (green bar) on line 88, and lines 87, 89-90 without coverage data](img/jacoco_coverage_example_v18_3.png) + ## Add JaCoCo coverage job To configure your pipeline to generate the coverage reports, add a job to your