How do you develop locally when your service calls 5 others?
Working on a service in a microservices setup and local development has turned into a chore. To run my one service, I basically need half the other services running too, or stubbed somehow, because it calls out to a chain of them. Spinning up the whole stack on my laptop is slow and half the time something in the chain is misconfigured.
I've been mocking the dependencies instead so I can develop and test my service in isolation. The question is how to do it without the mocks becoming a maintenance burden or drifting away from what the real services actually return. Hand-written mocks are quick to start but rot fast; recording real interactions and replaying them stays closer to reality but needs something to manage it.
Been reading about api mocking tools that record real traffic and replay it, which seems more sustainable than hand-maintaining stubs once you're mocking several services at once.
For those of you in microservices land: how do you handle this? Full stack locally, hand-written mocks, recorded-and-replayed traffic, or contract testing? And how do you stop the mocks from silently going stale as the upstream services change?
Learn More:- https://keploy.io/blog/community/what-is-api-mocking