How much coverage is enough

Back to list2026-08-25
You

Is 80% coverage a reasonable target?

ChatGPT

Coverage measures what ran, not what was checked. A suite at 80% with meaningful assertions is healthy; the same number reached by importing modules is decoration. Track it as a trend and never as a gate.

You

Mock the HTTP client or spin up a fake server?

ChatGPT

A fake server, when the protocol matters. Mocks encode your belief about the API, so they keep passing after the real one changes. A local server exercises serialisation, headers and timeouts, which is where the bugs actually live.

You

Which edge cases deserve a test in a small project?

ChatGPT

The ones that already bit you, and the boundaries: empty, one, many, malformed, and the largest input you claim to support. That list catches most regressions without turning the suite into a second implementation.

You

How do I know when it stops being worth it?

ChatGPT

When you stop noticing it. If it has not surfaced a problem in six months, it is either solved or it was never the bottleneck you thought.