4 ms·
> Why bother with stubbing, mocking and changing code to be testable if you can use the more useful integration End-to-end tests are useful, but they take a lo
by commandlinefan 5y ago
> Why bother with stubbing, mocking and changing code to be testable if you can use the more useful integration
End-to-end tests are useful, but they take a long time to set up, maintain and run. They have to have a live database to connect to and that database itself has to conform to particular preconditions that can easily be violated even if the code itself is just fine. What I've seen, over and over, is that the end-to-end test fail because the test database instance is under load, or somebody wrote a test that inserted some data but forgot to remove it, or it doesn't work right if two particular tests run at the same time, to the point where they report false negatives so often, everybody just starts ignoring them.