SpryCov

Actionable coverage report with your test results.

1 test, 0 failures

The following files are missing coverage:
lib/a.ex                                                         0.00% < 100.00% A
  lib/a.ex:2

SpryCov total coverage:   0.00%

Features

Installation

Add spry_cov to your list of dependencies in mix.exs:

def deps do
  [
    {:spry_cov, "~> 0.3.1", only: [:test]},
  ]
end

Configure the project in mix.exs:

def project() do
  [
    ...
    test_coverage: [tool: SpryCov],
    ...
  ]
end

Some of the default mix test options are compatible with SpryCov

Usage

Run mix test --cover

SpryCov will output all files with that don't meet the threshold with the lines not covered. It will get very "noisy" in projects with many coverage gaps, we can workaround by using grep

mix test --cover | grep lib/a.ex

When running tests for only a few files and/or directories SpryCov will display the coverage for only those files and/or directories, there is no need for using grep.

mix test --cover test/a_test.exs

Be careful because only the code being tested by those tests is going to be reported

License

Copyright (c) 2022, Tiago Moraes.

SpryCov source code is released under Apache 2 License.

Check NOTICE and LICENSE files for more information.