Hi everyone, We have recently implemented a solution to integrate code coverage results into Phabricator.
Coverage information is uploaded either automatically for revisions after they are landed in mozilla-central (for example for release managers when looking at uplift requests), or on-demand for in-progress revisions. For revisions under review, in order to upload coverage you just need to trigger a try push containing code coverage builds and tests, e.g. by using: $ mach try fuzzy --full and selecting the relevant ccov builds and test suites. In the future, we will also likely automatically trigger coverage try builds for revisions we deem to be risky, alongside the on-demand option. For example you can see my [try build](https://treeherder.mozilla.org/#/jobs?repo=try&revision=38213b49dc00cd108dfa9a246045ed677c34de91) which produced the coverage information for [my revision](https://phabricator.services.mozilla.com/D14758). Once the try build and linked tests finish, the coverage artifacts get parsed and uploaded to the Phabricator revisions corresponding to the commits in the try push. The analysis works on *all* commits in the try push that are linked to Phabricator revisions. Stacks of revisions are supported as well. The coverage information is shown on Phabricator both at a high-level view, in the *Revision Contents* section, and at a detailed view in the *Diff* section. The *Revision Contents* section contains a list of the files modified by the revision, showing both the coverage percentage of the whole file and the coverage percentage of touched lines. The *Diff* section instead shows the coverage line per line, coloring the bar on the right-hand side. <span style="color:#d86">**Orange**</span> corresponds to <span style="color:#d86">**uncovered lines**</span>, <span style="color:#def">**light blue**</span> corresponds to <span style="color:#def">**non-executable lines**</span> (e.g. a comment, a definition, and so on), <span style="color:#6bf">**dark blue**</span> corresponds to <span style="color:#6bf">**covered lines**</span>. When hovering the bar, the corresponding line is highlighted in the same color. You can find an alternative version of this email with fancy screenshots at https://marco-c.github.io/2019/01/21/code-coverage-phabricator.html or https://release.mozilla.org/tooling/codecoverage/2019/01/20/code-coverage-on-phabricator.html. Thanks, Marco. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform