Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsApr 11, 2026·2 min de lectura

Cypress — Fast, Easy & Reliable Browser Testing

Cypress is a next-generation front-end testing tool built for the modern web. Runs in the same run-loop as your app for superior debuggability, with time-travel, automatic waiting, real-time reloads, and screenshots on failure.

Introducción

Cypress is a fast, easy, and reliable testing tool for anything that runs in a browser. Unlike Selenium, Cypress runs inside the same process as your app, giving it unparalleled debugging capabilities: time-travel, real-time reloads, and video replay.

What Cypress Does

  • E2E tests — full browser automation
  • Component tests — mount React/Vue/Angular/Svelte components in isolation
  • Time-travel — hover test steps to see DOM at that moment
  • Auto wait — no manual waits, retries assertions automatically
  • Network stubbingcy.intercept() for mocking APIs
  • Video + screenshots — auto-capture on failure
  • Real browser — Chrome, Edge, Electron, Firefox, WebKit
  • CI/CD — GitHub Actions, CircleCI, Jenkins integrations

Architecture

Test code runs in the browser alongside the app (not over WebDriver). Cypress app = Electron shell with iframe hosting your site. Commands are chainable and automatically retryable. Dashboard service (paid) aggregates runs across CI.

Self-Hosting

Open-source CLI is free and self-hostable. Cypress Cloud (recording, analytics, parallelization) is paid.

# CI example (GitHub Actions)
- uses: cypress-io/github-action@v6
  with:
    build: npm run build
    start: npm start
    wait-on: "http://localhost:3000"

Key Features

  • Time-travel debugger
  • Automatic waiting/retrying
  • Real browser (not headless-only)
  • Component testing
  • Network stubbing (cy.intercept)
  • Video recording
  • Parallel test execution (Cloud)
  • TypeScript-first

Comparison

Tool Approach Cross-browser Parallel Debugging
Cypress In-browser Chromium + Firefox + WebKit Cloud (paid) Excellent
Playwright WebDriver Chromium + Firefox + WebKit Built-in Good
Selenium WebDriver Everything Grid OK
WebdriverIO WebDriver Everything Built-in Good

FAQ

Q: Cypress vs Playwright? A: Cypress has the best DX (time-travel visualization), but it has cross-origin restrictions and parallelization is paid. Playwright has stronger cross-browser + cross-origin support and native parallelization.

Q: Can it test multiple browsers? A: Yes. Chromium, Firefox, Edge, and WebKit (Safari) are all supported. Chrome provides the best debugging experience.

Q: How do I integrate with the backend? A: Use cy.task() to invoke Node.js functions (seed/clean the database), and cy.intercept() to mock HTTP.

Sources & Credits

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados