2 ms·
If the system doesn't work but all the tests pass, then you're missing one of two things: code coverage, or articulated requirements. Either code that you're n
by fatbird 5y ago
If the system doesn't work but all the tests pass, then you're missing one of two things: code coverage, or articulated requirements. Either code that you're not testing is crucially responsible for the system outcome, in which case it should be tested; or the demands of a unit of code with full coverage and passing tests don't include something that a consuming unit needs it to do.
Neither of these conditions is an argument against unit testing or mocking. Both indicate a fairly basic gap in how you're testing that should be fixed directly. If integration tests would catch this gap, you're still missing the basic thing you need while incurring the cost and risks of integration tests.