Q&A
How do you test third-party integrations — mock, sandbox, or contract?
Ajitesh MohantaAmbassador
3w ago 1,353 0
We integrate with: Stripe (payments), SendGrid (email), Twilio (SMS), and Segment (analytics). Each has a sandbox/test mode.
Current approach: mock all of them at the HTTP level in unit/integration tests, use sandboxes only in occasional manual testing.
Problem: our Stripe mock has drifted from the real API. We had a production incident last month where our mock didn't reflect a Stripe API change.
How do you balance: not hitting real sandboxes in every test run (slow, fragile) vs ensuring your mocks don't drift?