A tool for calculating test coverage using ExUnit for running tests. For now it calculates function coverage only.
To do:
- calculating line & branch coverage
The package can be installed by adding excoverage
to your list of dependencies in mix.exs
:
def deps do
[
{:excoverage, "~> 0.1.0"}
]
end
There are two possible way of using this tool:
- by setting a test coverage tool in mix.exs configuration file:
def project do
[
...
test_coverage: [tool: Excoverage],
...
]
and running:
mix test --cover
- by running:
mix excoverage
The docs can be found at https://hexdocs.pm/excoverage.