lcov_ex
Test coverage module to generate a lcov.info file for an Elixir project.
The docs can be found at https://hexdocs.pm/lcov_ex.
Why
Many test coverage tools use lcov files as an input to generate reports.
I use it to see inline coverage progress in vscode with the Coverage Gutters extension.
Installation
Add to your dependencies:
def deps do
[
{:lcov_ex, "~> 0.1.0"}
]
endThen, select LcovEx as your test coverage tool in your project configuration:
def project do
[
...
test_coverage: [tool: LcovEx],
...
]Usage
Run tests with coverage:
mix test --coverFile should be created at ./cover/lcov.info by default.
TODOs
- Add missing
FNlines, for the sake of completion. - Make it work as a
Taskto avoid overwriting thetest_coveragetool config.