5 ms·
I would go farther and claim that 100% test coverage is worse than 90% test coverage. You're probably testing irrelevant stuff - which just means that you have
by virgilp 7y ago
I would go farther and claim that 100% test coverage is worse than 90% test coverage. You're probably testing irrelevant stuff - which just means that you have more test code to maintain, and also likely means that your tests are bad (i.e. not testing business logic, but testing irrelevant implementation details).
Last, but not least, 100% test coverage means that your code is bad/ you're not programming defensively (how exactly did you cover all those error-handling bits for cases of unexpected exceptions/ "stuff that theoretically should never happen, but in practice it might, so let's have some sensible treatment/ logging/ etc."? )
- davidw 7y agoYep. At a certain point you start hitting diminishing returns and increased costs.
- plorkyeran 7y agoOr it could mean that you've contorted your code to make sure that you can hit every single defensive edge case, and in the process possibly introduced new bugs due to the increased complexity.