Local GUI coverage

Is there any simple way I can get nice coverage reports, with calls per line, locally? What do you guys use?

The process outlined in Coverage.jl is a bit convoluted. I’m basically looking for a local version of coveralls.io or codecov.io:

  1. edit my code
  2. run the tests
  3. see the report

All spoon-fed like…

1 Like
Pkg.test(...; coverage = true)

will place the statistics near the files.

Thanks @Tamas_Papp, it’s just that with the visual overview that I get from coveralls.io and codecov.io it’s a lot easier to see what hasn’t been tested and where. I know I can look for all the zeros in the output files from

Pkg.test(...; coverage = true)

but… Here’s a great explanation:

I want what ProfileView.jl does for profiling, but for coverage.

1 Like

I understand, but AFAICT someone has yet to code this.

Yap, thanks.

For Python, I’ve used the HTML output of coverage.py: Coverage.py — Coverage.py 6.4.4 documentation

I wonder if that renderer could be adapted to work with Julia code…

1 Like

I collected a set of trivial scripts I have been using for this purpose into


using LocalCoverage
generate_coverage(pkg)  # generate coverage information
open_coverage(pkg)      # open in a browser
clean_coverage(pkg)     # cleanup

Testing, comments, issues welcome.


Super cool. :100:

If you are using visual studio code, try the coverage-gutters extention https://github.com/ryanluker/vscode-coverage-gutters.
You can generate the lcov.info locally with Covarage.jl

using Coverage
coverage = process_folder()
LCOV.writefile("lcov.info", coverage) 

LocalCoverage.jl is for package. Is it also useful for the unit tests of Julia itself?

1 Like