-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test coverage measuring #40
Conversation
This adds excoveralls (which is the state of the art coverage tool) and a `mix spec` command which will run the whole suite with an HTML export of coverage. Closes #37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I tried it, it doesn't seem to print out the coverage when you run mix test
-- is it determined separately / statically? mix coveralls
seems to work, but I'm not sure where to see the html view you referenced. Can you add to the readme instructions for how to run / view coverage?
@@ -9,7 +9,16 @@ defmodule DpulCollections.MixProject do | |||
elixirc_paths: elixirc_paths(Mix.env()), | |||
start_permanent: Mix.env() == :prod, | |||
aliases: aliases(), | |||
deps: deps() | |||
deps: deps(), | |||
test_coverage: [tool: ExCoveralls], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i guess this makes mix test --cover
use excoveralls
@hackartisan Mix spec or mix coveralls.html should generate the html page. |
@tpendragon can you add that to the readme |
Yup! |
This adds excoveralls (which is the state of the art coverage tool) and a
mix spec
command which will run the whole suite with an HTML export of coverage and fail if the coverage is less than 100%.I decided on excoveralls based on the HTML view of
mix test --cover
not having a table of contents to see all coverage in one place. Read on https://elixirforum.com/t/code-coverage-tools-for-elixir/18102 thatexcoveralls
was the best option, and it seems well maintained.Closes #37