5 ms·
There's a middle tier, broad tests in the sense of not mocking local dependencies but only external (slow) ones. Many developers mock every dependency in a SUT
by elboru 4y ago
There's a middle tier, broad tests in the sense of not mocking local dependencies but only external (slow) ones.
Many developers mock every dependency in a SUT, even if they own the dependency. I like the idea of broad tests that run-in memory (no I/O interaction).
I think Ian Cooper does a great work explaining it in this talk (he talks about TDD, but I think the main idea applies even if you write tests after code): https://www.youtube.com/watch?v=EZ05e7EMOLM&ab_channel=DevTernityConference https://www.youtube.com/watch?v=EZ05e7EMOLM&ab_channel=DevTe...
- thom 4y agoThis is more what I was suggesting, although I’ve not actually found in-proc test doubles talking via localhost to be slow or brittle so I don’t mind mocking on either side of that divide. You’re going to write those mocks and tests anyway to check how you’re interacting with external systems in narrow tests, so you can choose how deep your broad tests go.