DEV Community

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

Collapse
 
n_develop profile image
Lars Richter

I think it's not one or the other. I totally do both. We have integrated 5 different payment providers at work. We have tests with mocked responses to make sure that OUR code works. But we also have tests against the test environments of each provider, to make sure that (for whatever reason) the responses (or the APIs) have not changed.
I think both approaches are important, but if you habe enough trust in your thirdparty systems, mocked responses should do the trick.