3 ms·
tl;dr Make sure you use integration tests (or a smoke test) as mocking away the entire environment will hide environmental and system errors when you actually
by boyter 15y ago
tl;dr
Make sure you use integration tests (or a smoke test) as mocking away the entire environment will hide environmental and system errors when you actually run things.
- bguthrie 15y agoI actually don't think that's a fair summary. The original article pointed out at least two other problems: - the size of the commit made it difficult to review it for potential errors, and - the feature, once committed, was not fully exercised, or as the article puts it, completely followed-through.
- boyter 15y agoSorry should have mentioned I was trying to boil down what you can learn from it. In which case a smoke test would highlight this issue pretty quickly.
- Yhippa 15y agoAlso if you have time try to use as much real-world data or a real-world scenario as possible. I've gotten burned when I've done unit and integration tests and still that one guy slips through that we never would have thought of but of course shows up come production time.
- boyter 15y agoAgreed. I tend to do the following to test any application that requires a high level of quality. 1. Unit tests - for regression testing and to enforce a clean design 2. Integration testing against real data - To check that there are no obvious bugs caused by bad interfaces or data 3. Smoke tests - To ensure that the core functionality works as expected They also get updated in terms of frequency in that order. Smoke tests take the most effort to make, but they deliver the most value so long as they have supporting unit and integration tests which catch obvious errors.