3 ms·
For those cases, tests have value in telling you where the bug isn't. For me, one of the biggest benefits of code that has been written to be testable is that
by regularfry 15y ago
For those cases, tests have value in telling you where the bug isn't.
For me, one of the biggest benefits of code that has been written to be testable is that it's been designed such that it's possible to reason about fine-grained details. If I find a problem, I can generally start adding tests as part of the debugging procedure to make assertions about the specific part of the code that I think might be failing.
That's much harder to do at a sufficiently high level of detail if the code wasn't structured to make it easy from the start.