Details
-
Improvement
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Right now, the coverage pages generated by the Jacoco plugin highglight both fully and partially covered instructions green, leaving no hint of coverage per branch. Especially with multiple conditions in an if (as in, a && b), both following code blocks are executed but it is unclear if all 4 possible combinations were tested.
This should be improved to match Jacoco's own HTML reports which this kind of branch coverage data exists.
Attachments
Issue Links
- is duplicated by
-
JENKINS-19633 Coverage report source view - lines incorrectly shaded
-
- Closed
-
Code changed in jenkins
User: Marcus Bauer
Path:
src/main/java/hudson/plugins/jacoco/report/SourceAnnotator.java
http://jenkins-ci.org/commit/jacoco-plugin/fa707103b2889d660d2be278bbe55bc7fc95c915
Log:
JENKINS-19526Branch Coverage InformationInstead of coverage based on the instruction counter, the displayed
partial and full coverage is based solely on branch information per
line of code. Lines are colored in green (full coverage), yellow
(partly covered) or red (not covered) for where coverage information
is available. Lines without coverage information are not formatted
any differently from the previous version.
Code with branch information is prefixed with a • and has a mouse-over
to display either "All X branches covered", "All X branches missed" or
"X of Y branches missed" for full, none and partial coverage
respectively.