Back to Prompt Library

Cypress API Intercept Prompt

Mock a backend API response during frontend testing using Cypress.

The Prompt

Create a Cypress test that intercepts a GET request to '/api/v1/users' and mocks the response with a 500 Internal Server Error. Verify that the UI displays the correct error boundary message.

How to use this prompt

Use this prompt when you need to simulate server downtime or edge case responses in your Cypress tests.

Tired of copying and pasting prompts?

GenTestCase uses a Multi-Agent AI Pipeline (8 specialized agents) to automatically extract requirements, write test cases, and handle edge cases—no prompt engineering required.

Generate Test Cases Automatically

Explore More Software Testing Topics