Share an lcov coverage report
lcov gives you a tracefile; genhtml turns it into the thing people
actually read:
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
genhtml coverage.info --output-directory coverage-html
What you get is coverage-html/index.html, a page per directory, a page
per source file with the hit counts in the gutter, and gcov.css. The
value is the drill-down — which is precisely what doesn't survive being
sent as an attachment.
No lcov or Perl on the machine you're on? Drop the .info file into the
free coverage viewer — it builds a summary report
(per-directory roll-up, least-covered files, uncovered line ranges) in the
browser.
Publish the directory
Drag coverage-html/ (or a zip of it) into
the app:
index.htmlbecomes the report body.- Every per-file page and the stylesheet upload alongside, and the
relative links between them are rewritten to the uploaded copies — so
clicking through from the summary to
src/parser.cstill works. - Nothing needs a local web server, which is the other reason these reports usually stay on one machine.
Same shape for JavaScript: nyc report --reporter=lcov writes
coverage/lcov-report/, and it publishes identically. For the Python
coverage html case, see
sharing an htmlcov folder.