DEV Community

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

Collapse
d_ir profile image
Daniel Irvine 🏳️‍🌈 Author

Thinking in terms of goals is something I’d agree with, and I also agree that coverage should be a secondary goal IF achieving it would be detrimental to team output. But I do think it’s an important aspirational goal for developers who want to get better at testing. (I’ve got another blog post about this topic, coming soon...)

I’ve worked for a TDD / XP consultancy before that always aimed for 100%. I don’t think they’d ever slip below 95%. I imagine that any company that is serious about TDD will be looking for close to 100% coverage.

Worth noting that you can still achieve 100% coverage in your OWN code (using TDD) even if the codebase overall doesn’t reach 100%.