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

Add an override to not track mutations for untested functions #627

Open
roookeee opened this issue Jun 21, 2019 · 2 comments
Open

Add an override to not track mutations for untested functions #627

roookeee opened this issue Jun 21, 2019 · 2 comments

Comments

@roookeee
Copy link

roookeee commented Jun 21, 2019

PITest will currently complain about surviving mutations for functions that are not tested at all. This prohibits to enforce a 100% mutation coverage without tediously excluding untested methods. This is useful as forcing a 100% mutation coverage combined with the outlined feature forces every test to be of the best quality instead of forcing the user to write unit tests for every method which is not the goal and/or usage area of pitest (at least how I see it).

I would need the given flag for the maven plugin at least.

@roookeee roookeee changed the title Add an override to not track mutations for untested lines Add an override to not track mutations for untested lines/functions Jun 21, 2019
@roookeee roookeee changed the title Add an override to not track mutations for untested lines/functions Add an override to not track mutations for untested functions Jun 21, 2019
@hcoles
Copy link
Owner

hcoles commented Jun 28, 2019

I think what you are looking for is #128 which I've been meaning to implement for some time now.

@roookeee
Copy link
Author

As I read it its a bit different: I want every tested line to a have at least the given mutation coverage. Lines that are not covered at all by any test should not be included which is the case at the moment. I can only achieve 80% mutation coverage if I have only tested 80% of my application which is a bit misleading

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

2 participants