Skip to content
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

Coverage ... #10

Open
1 task
nelsonic opened this issue Oct 16, 2018 · 7 comments
Open
1 task

Coverage ... #10

nelsonic opened this issue Oct 16, 2018 · 7 comments
Labels
chore enhancement New feature or request help wanted Extra attention is needed starter technical

Comments

@nelsonic
Copy link
Member

nelsonic commented Oct 16, 2018

@dwyl we have a "Gold Standard" for examples/tutorials which must be followed without exception.
Tutorials aimed at beginners should always have "complete tests" to eliminate any "excuse" people may have for not writing tests in their projects.

An example is incomplete without having 100% test coverage because
it either means that there is superfluous code (which can be removed)
OR there is untested code; functionality that is "magic". Both are "below expectations".

At present this example has 56% coverage:
https://codecov.io/github/dwyl/phoenix-ecto-append-only-log-example?branch=master

image

Todo

  • fix this: codecov.io
@nelsonic nelsonic added enhancement New feature or request help wanted Extra attention is needed chore starter technical labels Oct 16, 2018
@nelsonic
Copy link
Member Author

P.S: I never ask anyone to do something I'm not prepared to do myself:
https://codecov.io/github/dwyl/phoenix-chat-example?branch=master
image

@nelsonic
Copy link
Member Author

on localhost, the result of running the command MIX_ENV=test mix cover is:
image

Clearly we have some work to do to write a few more test ... 👷

@Danwhy
Copy link
Member

Danwhy commented Oct 17, 2018

We shouldn't need to write any more tests, the only lines that aren't covered are autogenerated Phoenix code

@nelsonic
Copy link
Member Author

@Danwhy yeah, I'm mostly seeing that ... however excoveralls thinks the Macros aren't being used:
image

@Danwhy
Copy link
Member

Danwhy commented Oct 17, 2018

Yeah, that's unfortunately a known issue: parroty/excoveralls#59

@nelsonic
Copy link
Member Author

@Danwhy yeah, sucks that Macros don't get "instrumented" for coverage.
Does it mean we need to switch to using "normal" Modules/Functions? see: #8

@Danwhy
Copy link
Member

Danwhy commented Oct 17, 2018

It is something to consider. I'll write up some of the pros and cons of each approach when answering #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore enhancement New feature or request help wanted Extra attention is needed starter technical
Projects
None yet
Development

No branches or pull requests

2 participants