3 ms·
What do you use instead of mocks when testing?
by apta 7y ago
What do you use instead of mocks when testing?
- GordonS 7y agoReal instances of the dependant class. A "unit test purist" would likely shun this, but I take more of a realist approach; in many real-world cases, mock-heavy tests make for brittle tests that don't give confidence of correctness. I tend to focus on integration tests, as I find these provide the most value while still executing very quickly (depending on the stack, obv). That doesn't mean I don't use unit tests, or that I never use mocks - I just use mocks very sparingly.