GrabMayank GuptaProblem & solution
Mockers - Overcoming Testing Challenges at Grab
Summary
Grab operates over 250 microservices communicating over HTTP and gRPC, making shared staging environments costly, ambiguous in ownership, and fragile due to inconsistent data and uncoordinated deployments. To address these testing bottlenecks, Grab created Mockers, a Go SDK and CLI tool backed by a central monorepo of mock servers for local-box and CI testing. Mockers automatically generates HTTP and gRPC mock servers from Swagger specifications and protobuf files, returning configured network responses without internal business logic. By incorporating Grab's in-house chaos SDK middleware, Mockers also enables repeatable resiliency and contract testing locally without relying on code-level mocks. While Grab still mandates integration testing on distributed staging environments with live data, Mockers enables developers to detect complex defects and contract mismatches earlier.
Context
Testing Grab's ecosystem of over 250 microservices on shared staging environments resulted in high debugging costs, ownership ambiguity, fragile test states, and difficulty testing negative or resilient failure modes.
Approach / What changed
Grab built Mockers, a Go SDK and CLI tool managing a monorepo of mock servers generated directly from Swagger API specs and protobuf definitions to run network-level contract, functional, and chaos tests locally and in CI.
Takeaways
Mockers creates network-level mock servers from API Swagger specifications or protobuf files instead of requiring developers to inject code-level interface mocks.
Integrated chaos SDK middleware in Mockers allows local simulation of latency, CPU spikes, memory leaks, and configurable failure percentages to test retries and fallback paths.
Despite shifting functional and contract tests to local boxes, teams must still maintain staging integration tests to validate against live microservice dependencies, real data, and streaming infrastructure.
Source and freshness
- Source
- engineering.grab.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.