3 ms·
> Most of the coding problems would have been caught had unit tests been clearer and closer to 100% branch/code coverage. It is amazing how many bugs lurk in th
by chriswarbo 11y ago
> Most of the coding problems would have been caught had unit tests been clearer and closer to 100% branch/code coverage. It is amazing how many bugs lurk in the last 5% of testing.
Presumably, coverage starts with the low-hanging fruit (simple, linear code; heavily-exercised code like startup routines and main loops; etc.) and grows to encompass ever more unweildy, smelly, edge-case parts of the codebase.
Hence, by increasing code coverage, we're boiling off the solvent of run-of-the-mill code, such that what remains uncovered gets an ever stronger concentration of hackery, unintelligibility and black magic. By 95% coverage, the bits remaining are those parts people don't want to touch, so I'd expect the concentration of bugs to be highest there.
:)
- hankerfaster 11y agoprecisely! As programmers that is what we care about. But really, at that point the business often doesn't care. Not when a requirement bug could cause months of lost engineer time. Our experience is requirement bugs are much more costly than a missed unit test resulting in a bug.