#Mocking api endpoints for e2e tesing in CI CD with Cypress

1 messages · Page 1 of 1 (latest)

pearl igloo
#

The title says everything, I've been searching for a long time but I couldn't find anything that seemed to be a good solution.
Do you know how I can achieve this ?

mental sealBOT
#

Hi @pearl igloo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information on mocking API endpoints for E2E testing in CI/CD with Cypress in a Next.js application.

However, Cypress does provide features for stubbing and intercepting network requests, which can be used to mock API endpoints. You can refer to the Cypress Network Requests documentation (https://docs.cypress.io/guides/guides/network-requests) for more details.

For more specific guidance on testing in Next.js with Cypress, you can refer to the Next.js Testing documentation (https://nextjs.org/docs/testing).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: