🏡 Home 📝 All posts

What's your take on writing tests for third party services or integrations?

Let's say you have an application that uses Stripe.

Stripe gives you a dev environment- own API key, own dashboard, own data, all separated from your Stripe's live data.

Do you write tests that interact with this dev environment or do you mock the responses or something alike?

I work on an app that has many integration tests communicating with test/dev/sandbox environments, and they sometimes fail due to errors on their services, not on our own. Now we're discussing if should we mock the responses instead.