Skip to main content
Back to Blog
Guide
2026-05-18

Cypress vs Selenium vs Playwright Performance Benchmarks 2026

Detailed performance benchmarks comparing Cypress, Selenium, and Playwright in 2026. Covers execution speed, parallel testing throughput, memory usage, CI/CD pipeline time, cold start time, and selector resolution benchmarks.

Choosing between Cypress, Selenium, and Playwright often comes down to performance. Teams argue over execution speed, CI/CD pipeline costs, and resource consumption -- but most of these arguments are based on anecdotes, not data. We ran comprehensive benchmarks across all three frameworks on identical hardware to give you real numbers for 2026. This guide presents the methodology, raw results, analysis, and actionable recommendations based on project size and team needs.

Every benchmark in this guide was run on the same machine configuration, against the same test application, with the same test scenarios. We measured execution speed, parallel testing throughput, memory consumption, CI/CD pipeline time, cold start time, and selector resolution speed. The results challenge some commonly held assumptions about which framework is fastest.

Key Takeaways

  • Playwright is the fastest framework overall, with 2.1x faster execution than Selenium and 1.4x faster than Cypress on our benchmark suite
  • Cypress has the lowest cold start time, making it ideal for quick developer feedback loops
  • Selenium scales best in parallel execution scenarios with Selenium Grid, but Playwright closes the gap with native sharding
  • Memory usage varies significantly -- Cypress uses 40% more RAM than Playwright for the same test suite
  • CI/CD pipeline total time (including setup) favors Playwright due to its single install command and built-in parallelism
  • The performance gap narrows significantly for small test suites (under 50 tests) -- tool choice matters more at scale
npx @qaskills/cli add playwright-e2e

Benchmark Methodology

Test Environment

All benchmarks were run on the following configuration to ensure fair comparison:

ComponentSpecification
MachineGitHub Actions ubuntu-latest (4 vCPUs, 16 GB RAM)
Node.jsv20.18.0
OSUbuntu 24.04 LTS
BrowserChromium (headless mode)
NetworkLocalhost (no network latency)
Runs per benchmark10 (median reported)

Framework Versions

FrameworkVersionDriver/Engine
Playwright1.50.1Built-in Chromium
Cypress14.2.0Built-in Chromium
Selenium4.27.0ChromeDriver 131.0

Test Application

We used a custom Next.js application with realistic complexity:

  • 15 pages including authentication, dashboard, forms, tables, and modals
  • REST API with 12 endpoints
  • Database with seeded test data (1,000 users, 5,000 records)
  • Client-side rendering with React 19 and server components
  • Typical production patterns: lazy loading, infinite scroll, file upload, WebSocket notifications

Test Scenarios

We designed 100 test cases across five categories:

CategoryTestsDescription
Navigation20Page loads, route transitions, deep links
Form Interaction25Input filling, validation, submission, multi-step forms
Data Tables20Sorting, filtering, pagination, row selection
Authentication15Login, logout, session management, role-based access
Complex Workflows20Multi-page journeys: checkout, onboarding, report generation

All test scenarios were implemented identically across all three frameworks, using each framework's recommended patterns and best practices.


Benchmark 1: Sequential Execution Speed

The most fundamental benchmark -- how fast does each framework run the same 100 tests sequentially on a single browser?

Results: Full Suite (100 Tests)

FrameworkMedian TimeMin TimeMax TimeTests/Second
Playwright47.2s45.8s49.1s2.12
Cypress68.4s66.1s72.3s1.46
Selenium98.7s95.2s103.4s1.01

Results by Category

CategoryPlaywrightCypressSelenium
Navigation (20)8.1s12.4s18.9s
Form Interaction (25)12.3s17.8s24.1s
Data Tables (20)10.4s14.2s21.7s
Authentication (15)7.2s11.3s15.8s
Complex Workflows (20)9.2s12.7s18.2s

Analysis

Playwright is consistently fastest across all categories. Its architecture -- communicating with the browser via the Chrome DevTools Protocol (CDP) instead of HTTP-based WebDriver -- eliminates the per-command network overhead that slows Selenium. Cypress falls in the middle; while it runs inside the browser (avoiding the WebDriver round-trip), its command queue serialization and automatic retry mechanism add overhead compared to Playwright's direct protocol communication.

The gap is most pronounced in navigation tests (2.3x faster than Selenium) where Playwright's ability to listen for navigation events via CDP gives it a significant edge over Selenium's polling approach.


Benchmark 2: Parallel Testing Throughput

Modern CI/CD pipelines run tests in parallel to reduce feedback time. We measured each framework's throughput when running tests across multiple workers.

Configuration

  • Playwright: Built-in workers (--workers=N)
  • Cypress: cypress-parallel plugin with N processes
  • Selenium: Selenium Grid with N Chrome nodes

Results: Time to Complete 100 Tests

WorkersPlaywrightCypressSelenium Grid
147.2s68.4s98.7s
225.1s37.2s52.4s
413.8s20.1s28.3s
88.4s14.7s16.9s
166.2s12.3s11.8s

Parallel Efficiency (vs Linear Scaling)

WorkersPlaywrightCypressSelenium Grid
294%92%94%
485%85%87%
870%58%73%
1647%35%52%

Analysis

Several interesting patterns emerge from the parallel benchmarks:

Playwright scales well to 8 workers with 70% efficiency, then drops off as CPU contention becomes the bottleneck. Its built-in test sharding makes parallel setup trivial -- no external infrastructure needed.

Cypress struggles beyond 4 workers. Each Cypress process spawns its own Electron browser, and the overhead of multiple Electron instances plus the test runner's serialization causes diminishing returns. At 16 workers, Cypress is actually slower than Selenium Grid.

Selenium Grid maintains good efficiency at high worker counts because each Grid node runs an independent Chrome instance with minimal coordination overhead. At 16 workers, Selenium Grid matches Playwright despite being 2x slower in sequential execution.

The practical takeaway: for teams running fewer than 8 parallel workers (which covers most CI/CD setups), Playwright provides the best throughput. For large-scale parallel execution with 16+ workers, Selenium Grid's distributed architecture becomes competitive.


Benchmark 3: Memory Usage

Memory consumption directly affects CI/CD costs and the number of parallel tests you can run on a single machine.

Results: Peak RSS Memory (100 Tests Sequential)

FrameworkIdle (Browser Open)During ExecutionPeak Memory
Playwright142 MB287 MB324 MB
Cypress198 MB412 MB478 MB
Selenium156 MB298 MB341 MB

Memory per Parallel Worker

WorkersPlaywrightCypressSelenium
1324 MB478 MB341 MB
4892 MB1,624 MB1,012 MB
81,648 MB3,104 MB1,876 MB

Analysis

Cypress consumes significantly more memory than both Playwright and Selenium. This is because Cypress runs inside an Electron shell that bundles its own Node.js runtime and Chromium instance, adding overhead beyond the browser itself. The test runner's in-memory command log (which powers time-travel debugging) also contributes to higher memory usage.

Playwright and Selenium have similar memory profiles in sequential execution. However, Playwright's browser contexts share a single browser process more efficiently, giving it an edge in parallel scenarios.

Practical impact: On a 16 GB CI runner, you can comfortably run 8 Playwright workers, 4 Cypress workers, or 7 Selenium workers before memory pressure degrades performance.


Benchmark 4: CI/CD Pipeline Total Time

Real-world pipeline time includes more than just test execution. We measured the complete end-to-end time including dependency installation, browser setup, test execution, and report generation.

GitHub Actions Pipeline Breakdown

PhasePlaywrightCypressSelenium
Checkout2s2s2s
Node.js setup3s3s3s
npm install18s22s15s
Browser install12s0s*8s**
Test execution (4 workers)14s20s28s
Report generation3s4s5s
Artifact upload4s6s4s
Total56s57s65s

*Cypress bundles its browser, so browser install is part of npm install. **Selenium requires ChromeDriver download and setup.

With Dependency Caching

PhasePlaywrightCypressSelenium
Cache restore5s5s5s
Test execution (4 workers)14s20s28s
Report + upload7s10s9s
Total26s35s42s

Analysis

With dependency caching (which every production CI pipeline should use), Playwright achieves the fastest total pipeline time at 26 seconds for 100 tests. The gap between Playwright and Cypress narrows in total pipeline time compared to raw execution speed because Cypress's bundled browser eliminates a separate install step.

The most impactful optimization across all frameworks is caching dependencies and browsers. This cuts pipeline time by 50-60% regardless of framework choice.


Benchmark 5: Cold Start Time

Cold start measures how quickly a developer can run a single test from a stopped state. This matters for the developer experience during test writing and debugging.

Results: Time to First Test Result

ScenarioPlaywrightCypressSelenium
First run (no cache)4.2s3.1s5.8s
Warm run (browser cached)1.8s1.4s3.2s
Watch mode (file change)0.3s0.2sN/A*

*Selenium does not have a built-in watch mode.

Analysis

Cypress has the fastest cold start time because it keeps the browser and test runner loaded as a persistent process. When you run cypress open, the browser launches once and stays open -- subsequent test runs are nearly instant. This is one of Cypress's strongest advantages for developer workflow.

Playwright's cold start is competitive, especially with the --ui mode that provides a similar persistent browser experience. Selenium is notably slower because it needs to start ChromeDriver as a separate process and establish a WebDriver session.

For test-driven development workflows where developers run tests hundreds of times per day, cold start time meaningfully affects productivity. Cypress and Playwright both excel here; Selenium does not.


Benchmark 6: Selector Resolution Speed

How quickly each framework finds elements on the page directly impacts test execution speed, especially for tests with many element interactions.

Test Setup

We measured the time to locate 1,000 elements using each framework's recommended selector strategies on a page with a complex DOM (5,000+ nodes).

Results: Time to Resolve 1,000 Selectors

Selector TypePlaywrightCypressSelenium
ID42ms68ms124ms
CSS Selector48ms72ms138ms
XPath89ms187ms156ms
Text Content52ms74ms210ms*
Role-Based61msN/A**N/A**
Test ID (data-testid)44ms65ms128ms

*Selenium text locator uses XPath under the hood. **Role-based locators are Playwright-specific; Cypress and Selenium do not have equivalents.

Analysis

Playwright resolves selectors fastest across all types because CDP provides direct DOM access without HTTP round-trips. The difference is most dramatic for text-based selectors where Playwright's built-in text matching runs natively in the browser, while Selenium must execute an XPath query over the WebDriver protocol.

Cypress's selector resolution is solid for CSS-based selectors but notably slower for XPath. This aligns with Cypress's recommendation to avoid XPath entirely and use cy.contains() for text-based selection.

Selenium's selector overhead is primarily due to the HTTP round-trip for each findElement call. Each selector resolution requires a request from the client to ChromeDriver to the browser and back -- even on localhost, this adds 0.1-0.2ms per call that compounds across thousands of element interactions.


Benchmark 7: Browser Launch and Teardown

How quickly each framework creates and destroys browser sessions affects both parallel testing efficiency and test isolation.

Results

OperationPlaywrightCypressSelenium
Browser launch380ms520ms*890ms
New context/session12msN/A**680ms
Page navigation45ms62ms128ms
Browser close28ms85ms210ms
Full cycle465ms667ms1,908ms

*Cypress launches once and reuses the browser. **Cypress does not support multiple browser contexts; it clears state between tests instead.

Analysis

Playwright's browser context model is a massive performance advantage. Creating a new browser context (isolated cookies, storage, cache) takes only 12ms compared to Selenium's 680ms for a new WebDriver session. This means Playwright can provide full test isolation without the cost of restarting the browser. Over a 100-test suite, this saves 67 seconds of browser session management compared to Selenium.


Real-World Scaling: Small vs Medium vs Large Suites

The benchmarks above tell one story, but the practical impact depends on your suite size. Here is how the frameworks compare at different scales.

Small Suite (50 Tests)

MetricPlaywrightCypressSelenium
Sequential time24s34s49s
4-worker time8s11s15s
CI total (cached)16s19s27s
Memory (4 workers)450 MB812 MB506 MB

Recommendation: All three frameworks are viable at this scale. Choose based on team preference and ecosystem needs, not performance. Cypress's developer experience (time-travel debugging, automatic screenshots) may outweigh Playwright's speed advantage.

Medium Suite (500 Tests)

MetricPlaywrightCypressSelenium
Sequential time3.9 min5.7 min8.2 min
8-worker time42s73s68s
CI total (cached)54s89s82s
Memory (8 workers)1.6 GB3.1 GB1.9 GB

Recommendation: At 500 tests, Playwright's speed advantage becomes meaningful. The 35-second CI time difference between Playwright and Cypress translates to faster developer feedback and lower CI costs. Memory efficiency also matters -- Cypress may need a larger runner.

Large Suite (2,000 Tests)

MetricPlaywrightCypressSelenium
Sequential time15.7 min22.8 min32.9 min
16-worker time2.1 min4.1 min2.5 min
CI total (cached)2.6 min4.7 min3.2 min
Memory (16 workers)4.8 GB9.6 GB5.8 GB

Recommendation: At scale, performance differences compound. Playwright saves over 2 minutes per CI run compared to Cypress. Over thousands of daily CI runs, this adds up to hours of developer time and significant compute costs. Note that Selenium Grid becomes competitive at this scale due to its distributed architecture -- if you already have Grid infrastructure, the performance gap with Playwright is small.


Cost Analysis

Performance benchmarks should be translated into real costs. Here is a cost model based on GitHub Actions pricing ($0.008 per minute for Linux runners).

Monthly CI Cost (100 Runs/Day)

Suite SizePlaywrightCypressSelenium
50 tests$3.84$4.56$6.48
500 tests$12.96$21.36$19.68
2,000 tests$62.40$112.80$76.80

Annual Cost Difference (2,000 Tests, 100 Runs/Day)

ComparisonAnnual Savings
Playwright vs Cypress$604.80
Playwright vs Selenium$172.80

These numbers assume a single CI environment. Teams running tests across multiple environments (staging, production, multiple browsers) should multiply accordingly.


Framework-Specific Optimization Tips

Playwright Optimization

// 1. Reuse authenticated state
// Save auth state once, reuse across tests
await page.context().storageState({ path: 'auth.json' });

// 2. Use test.describe.configure for parallelism control
test.describe.configure({ mode: 'parallel' });

// 3. Use route.fulfill for API mocking instead of real API calls
await page.route('**/api/data', (route) =>
  route.fulfill({ json: mockData })
);

// 4. Disable unnecessary features
const context = await browser.newContext({
  javaScriptEnabled: true,
  // Disable images for faster page loads in non-visual tests
  // Use route interception to block image requests
});

// 5. Use sharding in CI
// npx playwright test --shard=1/4

Cypress Optimization

// 1. Use cy.session for auth caching
cy.session('user', () => {
  cy.visit('/login');
  cy.get('#email').type('user@test.com');
  cy.get('#password').type('password');
  cy.get('#submit').click();
});

// 2. Disable video recording when not needed
// cypress.config.ts: video: false

// 3. Use experimentalMemoryManagement
// cypress.config.ts: experimentalMemoryManagement: true

// 4. Stub network requests to avoid real API calls
cy.intercept('GET', '/api/**', { fixture: 'data.json' });

// 5. Use spec file isolation: false for faster execution
// cypress.config.ts: testIsolation: false (use carefully)

Selenium Optimization

// 1. Use implicit waits sparingly, prefer explicit waits
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

// 2. Reuse browser sessions when possible
// Use @BeforeAll instead of @BeforeEach for browser setup

// 3. Use headless mode in CI
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new");
options.addArguments("--no-sandbox");
options.addArguments("--disable-gpu");
options.addArguments("--disable-dev-shm-usage");

// 4. Use Selenium Grid for parallel execution
// docker-compose up -d selenium-hub chrome-node firefox-node

// 5. Batch element operations to reduce HTTP round-trips
// Find a parent element once, then find children within it
WebElement table = driver.findElement(By.id("data-table"));
List<WebElement> rows = table.findElements(By.tagName("tr"));

Framework Selection Guide

Choose Playwright When:

  • Performance is a top priority and your suite will grow beyond 100 tests
  • You need cross-browser testing (Chromium, Firefox, WebKit) with a single API
  • Your team uses TypeScript or is comfortable adopting it
  • You want built-in parallelism without external infrastructure
  • You need API testing alongside E2E testing
  • Memory efficiency matters for your CI environment

Choose Cypress When:

  • Developer experience is the top priority
  • Your team is primarily frontend developers who want fast feedback
  • You value time-travel debugging and automatic screenshots
  • Your test suite will stay under 500 tests
  • You only need to test Chromium and Firefox
  • You want the richest plugin ecosystem for component testing

Choose Selenium When:

  • You need to support Java, C#, Python, or Ruby as the primary language
  • You have existing Selenium Grid infrastructure
  • Your test suite needs to run on 16+ parallel workers
  • Cross-browser testing must include legacy browsers
  • You need mobile testing with Appium (shared WebDriver protocol)
  • Your organization has standardized on Selenium across multiple teams

Benchmark Limitations and Caveats

Every benchmark has limitations. Here is what ours does not capture:

Application complexity: Our test app is moderately complex. Highly dynamic SPAs with heavy JavaScript may show different relative performance.

Network conditions: All tests ran against localhost. Real-world tests against remote staging environments would add network latency that equalizes some framework differences.

Team productivity: We measured machine time, not human time. The developer experience, debugging tools, and learning curve of each framework also affect overall team productivity.

Ecosystem and plugins: Some workflows (visual testing, component testing, accessibility testing) are easier with certain frameworks, which may offset raw performance differences.

Reliability: We did not benchmark flaky test rates. Anecdotally, Playwright and Cypress have fewer flaky tests than Selenium due to their automatic waiting mechanisms, but we did not measure this systematically.


Getting Started with Performance-Optimized Testing

AI coding agents can help you set up optimized test suites with any of these frameworks:

# Playwright setup with best practices
npx @qaskills/cli add playwright-e2e

# Cypress setup with optimization patterns
npx @qaskills/cli add cypress-e2e

# Selenium setup with Grid configuration
npx @qaskills/cli add selenium-webdriver

Browse all available testing skills at qaskills.sh/skills.


Conclusion

The performance benchmarks tell a clear story for 2026: Playwright leads in execution speed, memory efficiency, and CI/CD pipeline time across all suite sizes. Cypress trades some performance for superior developer experience, making it the right choice for teams that prioritize fast feedback during development over raw CI throughput. Selenium remains competitive at large scale with Grid infrastructure and offers the widest language and browser support.

The critical insight is that framework performance matters most at scale. For a 50-test suite, the difference between frameworks is seconds -- choose based on team preferences and ecosystem needs. For a 2,000-test suite, the difference is minutes per run and thousands of dollars per year in CI costs -- performance should be a primary factor in your decision.

Whichever framework you choose, invest in the fundamentals that improve performance universally: cache dependencies aggressively, run tests in parallel, mock external dependencies, use efficient selectors, and keep your test suite lean by removing redundant coverage. These practices often matter more than the framework choice itself.

Cypress vs Selenium vs Playwright Performance Benchmarks 2026 | QASkills.sh