2 ms·
Not an apologist for unit tests, but I'll bite here: unit tests are still valuable when you have the capacity to run ful integration tests. A unit test can run
by cpfohl 9y ago
Not an apologist for unit tests, but I'll bite here: unit tests are still valuable when you have the capacity to run ful integration tests.
A unit test can run really fast, for one, it can cover future use cases that don't get covered in integration, it edge cases you don't expect to hit, but are still important to cover in case something happens.
I'm sure there are more, good reasons to write unit tests and integration tests, but those two easy pickings are probably the source of your down votes
- Bahamut 9y agoUnit tests run much faster and are more focused - relying too much on integration tests to catch bugs is a massive maintenance smell, as you will waste an enormous amount of time trying to figure out the root cause of a failing test.