Workspace.Coverage.LCOV (Workspace v0.2.0)
View Sourcelcov coverage exporter.
Using lcov with genhtml
You can combine the lcov exporter, with the genhtml command in order
to generate an HTML coverage report for your complete workspace codebase.
From the workspace Makefile:
.PHONY: coverage
coverage: ## Generates coverage report
mix workspace.run -t test -- --cover
mix workspace.test.coverage
genhtml artifacts/coverage/lcoverage.lcov -o artifacts/coverage --prefic ${PWD}Options
The following options are supported:
:filename- the.lcovfilename, defaults tocoverage.lcov:output_path- the output path, defaults tocoverunder the current directory
Usage
In order to enable LCOV coverage exporter you can add the following
to your workspace's :test_coverage, :exporters config:
test_coverage: [
exporters: [
lcov: fn workspace, coverage_stats ->
Workspace.Coverage.LCOV.export(workspace, coverage_stats,
output_path: "artifacts/coverage"
)
end
]
]