3 ms·
I think this one is context dependent. If you are a small or medium project that doesn't make many RPCs just test with the real thing. Once I got to google wh
by aleksiy123 3y ago
I think this one is context dependent.
If you are a small or medium project that doesn't make many RPCs just test with the real thing.
Once I got to google which makes many RPCs in every layer it just wasn't viable to not use mocking. I use mocks in almost every thing.
Yes, it makes unit tests brittle and couples to implementation. But unit tests are cheap and often need to be changed anyways. It also allows you to have control over certain situations like what happens if an error occurs. Which can be hard to test for in integration tests.
In short I feel like avoid mocks if you can but embrace them if you can't.
- joeblubaugh 3y agoDo they still have guitar? I thought guitar was a really cool project
- aleksiy123 3y agoYeah, still use guitar.