Home/Testing/Cypress
Testing
cypress

Cypress

TypeScriptOpen SourcePaidTesting

Developer-friendly E2E and component testing for web apps. Famous for its time-travel debugging, real browser testing, and the best-in-class test runner UI that shows tests executing live.

License

MIT

Language

TypeScript / JavaScript

Used for
85
Trust
Strong

Why Cypress?

E2E testing with visual time-travel debugging

Component testing for React/Vue/Angular in a real browser

Your team prefers an interactive test runner over headless CI

Signal Breakdown

What drives the Trust Score

Weekly npm downloads
6.5M/wk
GitHub commits (90d)
210
GitHub stars
48k
Stack Overflow questions
52k
Community health
Active
Weighted Trust Score85 / 100

Download Trend

Last 12 months

Tradeoffs & Caveats

Know before you commit

Multi-browser testing is required — Cypress only runs Chromium-based

Python backend testing — Playwright has better Python SDK

Performance testing at scale — Playwright handles parallelism better

Pricing

Free tier & paid plans

Free tier

Open source runner (unlimited local tests)

Paid

Cypress Cloud from $67/mo

Local testing always free

Alternative Tools

Other options worth considering

playwright
Playwright90Excellent

Microsoft's end-to-end testing framework for web apps. Supports Chromium, Firefox, and WebKit with a single API, auto-waiting, network interception, and visual comparison testing.

Often Used Together

Complementary tools that pair well with Cypress

jest

Jest

Testing

91Excellent
View
nextjs

Next.js

Frontend & UI

98Excellent
View
github-actions

GitHub Actions

DevOps & Infra

50Limited
View
vercel

Vercel

Hosting & Deploy

89Strong
View
supabase

Supabase

Database & Cache

95Excellent
View

Learning Resources

Docs, videos, tutorials, and courses

Get Started

Repository and installation options

View on GitHub

github.com/cypress-io/cypress

npmnpm install --save-dev cypress

Quick Start

Copy and adapt to get going fast

// cypress/e2e/checkout.cy.ts
describe('Checkout flow', () => {
  beforeEach(() => cy.login());

  it('completes a purchase', () => {
    cy.visit('/products');
    cy.get('[data-cy="product-card"]').first().click();
    cy.get('[data-cy="add-to-cart"]').click();
    cy.get('[data-cy="cart-count"]').should('contain', '1');
    cy.get('[data-cy="checkout"]').click();
    cy.url().should('include', '/checkout');
  });
});

Code Examples

Common usage patterns

Intercept API requests

Stub network calls in Cypress tests

// cypress/e2e/posts.cy.ts
it('displays stubbed posts', () => {
  cy.intercept('GET', '/api/posts', {
    body: [{ id: 1, title: 'Hello World' }],
  }).as('getPosts');

  cy.visit('/posts');
  cy.wait('@getPosts');
  cy.contains('Hello World').should('be.visible');
});

Component test

Test a React component in isolation

// cypress/component/Button.cy.tsx
import { Button } from '../../src/components/Button';

describe('Button', () => {
  it('calls onClick when clicked', () => {
    const onClick = cy.stub().as('onClick');
    cy.mount(<Button onClick={onClick}>Click me</Button>);
    cy.get('button').click();
    cy.get('@onClick').should('have.been.calledOnce');
  });
});

Community Notes

Real experiences from developers who've used this tool