Cypress · Browser testing end to end

What is Cypress and what problem does it solve?

Easycypresse2e testingtest runnerUpdated Oct 2026
Quiz this track

Short answer

Cypress is a JavaScript end-to-end testing framework that runs tests in the same browser loop as the application. It provides a runner, automatic waiting, network control and time-travel debugging.

Cypress drives a real browser and tests the application the way a user would: visiting pages, clicking, typing and asserting on what appears. Unlike a remote WebDriver setup, the test code runs inside the browser alongside the app, which lets Cypress observe and control the page directly.

The framework bundles the things an end-to-end suite usually needs: a test runner with a command log, automatic retry of assertions, network stubbing through cy.intercept, fixtures, screenshots and video. That integration is why a Cypress test reads as a short sequence of user actions.

ts
describe("login", () => {
  it("shows the dashboard after a valid sign in", () => {
    cy.visit("/login");
    cy.get("[data-cy=email]").type("asha@example.com");
    cy.get("[data-cy=password]").type("secret123");
    cy.get("[data-cy=submit]").click();
    cy.location("pathname").should("eq", "/dashboard");
  });
});
The test describes user behaviour and lets Cypress handle timing and assertions.

What Cypress gives you

  • A runner that shows every command and a DOM snapshot at each step
  • Command queuing with retry-ability instead of manual sleeps
  • Network interception and response stubbing
  • Fixtures, custom commands, screenshots, video and CI reporting
Cypress is strongest for browser-level integration tests and component tests. It is not a general-purpose unit test runner, and it does not replace a backend test suite.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What does Cypress run inside the browser?
  2. 2When would you choose a unit test instead of an end-to-end test?
  3. 3How does Cypress differ from Selenium?
  4. 4What kinds of applications are a poor fit for Cypress?

Say it in the interview

Cypress is an end-to-end testing framework that runs test code in the same browser runtime as the application. It gives me a runner with a command log, automatic retries for assertions, network interception and fixtures. I use it to test real user journeys and integration points that unit tests cannot cover. It is not a unit test runner and it does not replace backend tests.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Cypress mock interview and get scored feedback on depth, clarity and confidence.