Cypress interview questions — Medium

353 medium-level Cypress questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.

What this covers

Cypress appears throughout Automation Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.

2 example questions

  1. 1. What does cy.intercept() do?

    • A. Pauses the test for debugging.
    • B. Spies on and/or stubs network requests/responses.correct
    • C. Takes a screenshot.
    • D. Switches to a new browser tab.

    Why: cy.intercept() lets you spy on, stub, or modify network requests and responses — useful for mocking APIs and asserting calls.

  2. 2. A key architectural fact about Cypress is that it…

    • A. Runs remotely via the WebDriver protocol.
    • B. Executes in the same run loop as the application, inside the browser.correct
    • C. Only supports headless Chrome.
    • D. Cannot stub network requests.

    Why: Cypress runs inside the browser in the same event loop as the app under test, which is why it has native access and automatic waiting (but limited cross-origin/tab support).

Related Automation Testing topics