Local test coverage in Julia2018/03/09
While codecov.io and coveralls.io are fine services and very easy to set up for Github repositories with Julia packages, they become more difficult to use under some circumstances. For example, if testing requires large binaries you don't want to build every time, you need to build a Docker image to run testing and obtain coverage information. Also, if your test scripts take a long time and you have access to a powerful computer, you might want to just run coverage locally when working on the code.
Naturally, Julia has all the facilities for generating and collecting coverage information locally. To make their application even easier, I packaged up a small set of scripts in LocalCoverage.jl that I use to generate and visualize coverage information for Julia packages on my machine.
This is how it works:
Pkg.test(pkg; coverage = true),
Coverage.jlfor collecting information to a single file in
c. unless disabled, run the external program
genhtmlto format everything as a nice HTML file.
if you have generated the HTML files,
open_coverage(pkg)opens them for you in your default browser.
if you want to tidy up, run
This is what it looks like for this package:comments powered by Disqus