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

Minimum coverage by group #1093

Open
mak-dunkelziffer opened this issue Jun 7, 2024 · 0 comments
Open

Minimum coverage by group #1093

mak-dunkelziffer opened this issue Jun 7, 2024 · 0 comments

Comments

@mak-dunkelziffer
Copy link

I think it could be useful to set minimum coverage thresholds per group. Especially when you are trying to get a whole project to 100% test coverage, it makes it easier to complete this "one group at a time" and then "lock the group to 100%", so future devs can't slack off there anymore. Or you could want e.g. your Rails models to have 100% coverage and be less strict with the controllers.

This interface could be possible:

SimpleCov.minimum_coverage_by_group(
  {
    'Models' => { line: 100, branch: 100 },
    'Controllers' => 90 # means primary coverage
  }
)

SimpleCov already has the data for that, because it renders those percentages into the HTML output. Would this be difficult to implement? Would you accept a PR for this?

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

1 participant