3 ms·
> It's easy to achieve 100% test coverage If code hasn’t been written to be testable, 100% coverage is not _easy_, by any stretch. Any legacy code base written
by jonhohle 4y ago
> It's easy to achieve 100% test coverage
If code hasn’t been written to be testable, 100% coverage is not _easy_, by any stretch. Any legacy code base written without unit tests that I’ve come across required significant refactoring to get any basic assertions I place, let alone any reasonable coverage.
I also think there is some value in high coverage, even without assertions. At a minimum it’s a guarantee that code has been run before production/distribution. That’s probably a lot more than can be said about a lot of code.