Should and how to mock server-side API calls? #21185
Unanswered
VickyLund
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All,
Cypress suggests that we should not test external systems in our E2E tests.
Our website's JS calls our API, which internally calls some external APIs from the server-side(microservice) and then applies some manipulations on the data and returns to UI.
Should we mock these API calls?
We believe yes.
How should we mock these API calls?
By passing some flags in the request, maybe, we are not sure yet.
We want to know if we are going in the right direction?
PS: We are aware of the Cypress mocking features, and we use those when we call external APIs from the JS itself.
Beta Was this translation helpful? Give feedback.
All reactions