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

Should we filter out known testing directories by default? #816

Open
PragTob opened this issue Jan 11, 2020 · 2 comments
Open

Should we filter out known testing directories by default? #816

PragTob opened this issue Jan 11, 2020 · 2 comments

Comments

@PragTob
Copy link
Collaborator

PragTob commented Jan 11, 2020

By default SimpleCov also tracks "coverage" for the run tests (spec/test/features directories) - which has always confused me as that pretty much only tests "are we running all of our tests?" (which sometimes leads to surprising results but that's a different topic...).

We also do the same thing in our own test (aka we assert against the specs and all of them are 100% covered).

I find this to always artificially inflate coverage numbers as of course way more code is executed but that's not what you really want to check for - you care about your application code!

So one of the first things I do in any code base personally is add_filter "spec" and add_filter "features" or what not.

Of course if we did this, we'd also need a nicer way to remove filters/profiles again #803

What do you think? Would that be a good default? Yes/No/Maybe?

@colszowka @deivid-rodriguez @bf4

@deivid-rodriguez
Copy link
Collaborator

I personally prefer not to filter out testing directories, because it has helped me with tracking dead code inside my test suite. But yeah, it is true that the percentages are a bit inflated when you do that.

@bf4
Copy link
Collaborator

bf4 commented Jan 11, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants