DEV Community

Discussion on: Do you aim for 80% code coverage? Let me guess which 80% you choose...

Collapse
 
miniscruff profile image
miniscruff

Agree, code coverage to me is a sanity check in things I may have missed. But TDD or similar helps give me the confidence I need.

Having a test cover a line of code is not as good as being confident it works. But, I know if it's not covered I am not confident at all it works.

Collapse
 
patryktech profile image
Patryk

I may be reasonably confident something works even without automated testing. My threshold for acceptable confidence varies on whether something is a side project, or an app that handles customer payments, or if I'm prototyping as opposed to writing production code.

Sometimes, manual testing is good enough for me... Context is important.

I do love automated testing, for the record, and think it's important. Just be pragmatic about it.

Thread Thread
 
miniscruff profile image
miniscruff

Sure, I tend to skip testing entirely for the first release. Gotta get something out there first.

I also accept manual testing IF you only have like 2 end points but probably only for a single update or temp fix. Long term nothing beats automated tests.