4 ms·
Kent Beck (the originator of test-driven development) defines a unit test as "a test that runs in isolation from other tests". This is very different from the p
by bedobi 3y ago
Kent Beck (the originator of test-driven development) defines a unit test as "a test that runs in isolation from other tests". This is very different from the popular and completely misguided definition of a unit test as "a test that tests a class/method in isolation from other classes/methods".
But it doesn't really matter if you want to call a given test an "integration" test or a "unit" test. The point of any test is to fail when something breaks and pass when something works, even if the implementation is changed. If it does the opposite in either of those cases, it's not a good test.
- randomdata 3y ago> The point of any test is to fail when something breaks and pass when something works The point of any test is to document API expectations for future developers (which may include you). That the documentation happens to be self-validating is merely a nice side effect.
- troupo 3y agoKent Beck also said [0] "I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence" [0] https://stackoverflow.com/a/153565 https://stackoverflow.com/a/153565