Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19526

Display Branch Coverage Information

    XMLWordPrintable

    Details

    • Similar Issues:

      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.

      GitHub Pull Request

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            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-19526 Branch Coverage Information

            Instead 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.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - 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-19526 Branch Coverage Information Instead 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.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ognjenb
            Path:
            src/main/java/hudson/plugins/jacoco/report/SourceAnnotator.java
            http://jenkins-ci.org/commit/jacoco-plugin/e57b7266170f080d9bce371147363557e0fe23e7
            Log:
            Merge pull request #27 from mabako/branch-coverage

            JENKINS-19526 Branch Coverage Information

            Compare: https://github.com/jenkinsci/jacoco-plugin/compare/62b24aa50560...e57b7266170f

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ognjenb Path: src/main/java/hudson/plugins/jacoco/report/SourceAnnotator.java http://jenkins-ci.org/commit/jacoco-plugin/e57b7266170f080d9bce371147363557e0fe23e7 Log: Merge pull request #27 from mabako/branch-coverage JENKINS-19526 Branch Coverage Information Compare: https://github.com/jenkinsci/jacoco-plugin/compare/62b24aa50560...e57b7266170f
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Marcus Bauer
            Path:
            src/main/java/hudson/plugins/jacoco/report/SourceAnnotator.java
            http://jenkins-ci.org/commit/jacoco-plugin/7d3db625cfe14bec931626f6e13966f06b8d4dd5
            Log:
            JENKINS-19526 Branch Coverage Information

            Instead 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.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marcus Bauer Path: src/main/java/hudson/plugins/jacoco/report/SourceAnnotator.java http://jenkins-ci.org/commit/jacoco-plugin/7d3db625cfe14bec931626f6e13966f06b8d4dd5 Log: JENKINS-19526 Branch Coverage Information Instead 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.

              People

              • Assignee:
                Unassigned
                Reporter:
                bauer Marcus Bauer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: