Skip to main content
Community
Q&A

How do you balance test coverage percentage targets vs meaningful test quality?

Ajitesh Mohanta
Ajitesh MohantaAmbassador
Apr 4, 2026 2,351 0
Our engineering director wants 80% code coverage enforced in CI. I understand the intent but I'm worried about Goodhart's Law — once coverage becomes the metric, teams write tests that cover code without actually testing anything. I've seen: - Tests that call a function and assert `True` just to hit the line - Tests that are so tightly coupled to implementation they break on every refactor - 100% coverage on a module with a critical bug in the business logic Is there a better metric to advocate for? Or a way to enforce meaningful coverage rather than just line coverage? Code coverage as a floor ("never go below X") vs a target ("always hit X") feels like a meaningful distinction.

No replies yet. Be the first to answer this question!

Join the discussion

Sign in to join the discussion

Sign in