Selenium isn’t enough anymore
Selenium (2004+) is the E2E testing standard: drives browsers via WebDriver, but is slow, flaky, hard to debug, with a verbose API. For React/Vue/Angular apps with complex state and async loading, Selenium tests are fragile.
The release
Cypress 3.0 is released by Cypress.io on 29 May 2018. Founder and leads: Brian Mann, Gleb Bahmutov. MIT licence for open source version. Commercial Cypress Dashboard recording tool.
Different architecture
Unlike Selenium, Cypress doesn’t use WebDriver. Tests run in the same JavaScript context as the tested application:
- No RPC latency
- Direct access to DOM, store, network
- Built-in auto-waiting (no more
sleep()) - Time travel debugging — snapshot at each command
describe('Login', () => {
it('logs in valid user', () => {
cy.visit('/login');
cy.get('[name=email]').type('ada@example.com');
cy.get('[name=password]').type('secret');
cy.contains('button', 'Login').click();
cy.url().should('include', '/dashboard');
});
});
Features
- Auto-waiting —
cy.get()waits for element automatically - Time travel — hover over step to see DOM state
- Real-time reload — save test → re-run
- Screenshots & video — on failure or always
- Network stubbing —
cy.intercept()for API mocks - Cross-browser — Chrome/Edge/Firefox/Electron (from 4.x also WebKit/Safari via Playwright driver)
Main versions
- 3.0 (May 2018) — plugin system, new Cypress
- 4.0 (February 2020) — Firefox, Edge support
- 6.0 (November 2020) — retry, Test Runner UI
- 10.0 (June 2022) — breaking changes, Component Testing
- 12.0 (December 2022) — detached DOM handling
- 13.0 (August 2023) — Chrome 115+ required
- 14.0 (2024) — Node 18+, Studio improvements
Component Testing
From 10.x Cypress supports Component Testing: mounting isolated React/Vue/Angular/Svelte components, testing them with Cypress API. Competitor to Storybook + Testing Library.
Limitations
- No multi-tab — tests run in a single tab
- Cross-origin — limitations (mitigated with
cy.origin()from 12.x) - Iframes — limited support
- Performance — faster than Selenium but slower than API tests
Competitors
- Playwright (Microsoft, 2020) — similar architecture but multi-tab, parallel built-in
- Selenium (2004) — legacy, less flaky in 2024 with W3C WebDriver BiDi
- TestCafe — similar
- Nightwatch.js — on WebDriver, modernised
In the Italian context
Cypress is widely used in Italian frontend teams:
- Headless e-commerce for checkout validation
- Fintech for critical flows (login, transactions, KYC)
- B2B SaaS
- Digital PA — SPID/CIE login flow, PagoPA testing
- Bootcamps and modern frontend courses
Many teams are evaluating Playwright for new projects thanks to native parallelism and WebKit support.
References: Cypress 3.0 (29 May 2018). Brian Mann, Gleb Bahmutov, Cypress.io. MIT licence (core). In-browser architecture. Component Testing from 10.x. Current version 14.x (2024).
