-
Notifications
You must be signed in to change notification settings - Fork 36
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
Increase scenario coverage for each package that has less than 80% #812
Comments
@fkautz , @edwarnicke Is 80% enough coverage? |
@denis-tingaikin 80% is probably the right amount. Code coverage itself is basically meaningless. I can get 100% code coverage over code without necessarily exercising all possible cases. It's also important to understand that unit tests don't necessarily test code correctness (though that's always the goal), they test that code behavior does not change. Finally some error cases are almost impossible to 'force' without doing deeply unnatural things to your code to allow exercising them. None of which means code coverage isn't a good idea... it just means obsessing about it isn't a good idea :) 80% is a pretty good middle ground goal. It prevents the unproductive obsessive drive to 100% when that is unreasonable or undesirable... but it encourages good levels of coverage. All of that said... we are likely to find cases (like recvfd/sendfd) where unit tests will be extremely hard to reasonable execute, so intelligent discretion should be employed. |
After manual filtering (by criteria 80% and what will not be reworked in the next days) we have this:
|
Finally, I think we should add new unit tests during fixing issues, then we'll increase code coverage naturally. |
@denis-tingaikin There's a good balance there as well... testing is a good way to make sure things stay the way you expect them to be. If you put in too much testing to early, it becomes an impediment to fixing bugs (because to much testing can bake in design bugs)... if you have to little, you lack the confidence to make changes. I definitely agree that when we find issues downstream we need to fix its a good thing to add unit tests earlier to make sure they don't recur. |
Our current coverage for 0d2dc28 is:
The text was updated successfully, but these errors were encountered: