lundi 3 février 2020

How to resolve the stability of external api integration test?

I have some classes/methods that involve calling external apis. I created a integration test to make sure that I get the correct response and have the correct business logic to manipulate the response. But some times The external api returns different responses which cause my test failing.

Should I just mock the response?

Is it against the purpose of the integration test?

If so what’s the best choice?

Aucun commentaire:

Enregistrer un commentaire