4 ms·
> Why next week? I think pleasecalllater's point is that without unit tests, you'll spend a lot of time just pinpointing the bug, since it could be anywhere in
by adwn 7y ago
> Why next week?
I think pleasecalllater's point is that without unit tests, you'll spend a lot of time just pinpointing the bug, since it could be anywhere in your module (which unit tests would cover), not just at the interface to other modules (which integration tests cover).
- jondubois 7y agoThat's not my experience. Usually it only takes me a few minutes to fix a bug once it has been caught by an integration test.
- pleasecalllater 7y agoDepends on your system. Mine usually are huge. The integration test showing "this json reply is wrong" doesn't tell me anything else than I have to dig through all the layers.
- jondubois 7y agoMaybe you should break up that large system into more manageable chunks (e.g. microservices, engines, ...) and integration test those individually.
- Ace17 7y agoIf your tests: - run fast (<10s) - run on your local machine - run on your local code (including uncomitted diffs) ... whether they're called "integration" or "unit" tests doesn't matter, as they will detect regressions at the earliest possible time. Unit tests might guarantee smaller code search area (because maybe the failing test only executed 1% of the code), but if running "git stash" makes all the tests pass again, I have a pretty good confidence about where the error lies.