DEV Community

Discussion on: How much code coverage is enough?

Collapse
 
adambullmer profile image
Adam Bullmer

I've actually realized a benefit to 100% coverage that you cannot get with anything less. If you maintain 100%, that means you will never introduce untested code. Otherwise youigbt select and add code, maintain overall coverage percent and no one will notice if unexercosed code is introduced.

Of course quality and fragility of tests are also important factors in successful tests. Meaningful assertions to utilize this coverage are also necessary or else you arent fully reaping the benefits of all this coverage. 100% coverage is generally coaxed out one way or another, be it in your automatic unit/integration/e2e tests, or through manual QA.

It definitely takes a lot of work to get here, and isn't recommended for time constrained projects. I do agree with the other comments here where it isn't necessary, but I did feel compelled to highlight the other side of the argument.