Decide when to use Playwright component testing (@playwright/experimental-ct-*) versus full end-to-end tests for a given feature

domain: playwright.dev · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Reach for component testing to verify a single component's rendering, props, and events in isolation, since it mounts just that component in a real browser without a full app or server
  2. Reach for E2E when behavior depends on routing, real API responses, authentication, or cross-component integration that an isolated mount can't reproduce
  3. Remember component tests still run in a real browser via Playwright, catching real rendering bugs that jsdom-based unit tests miss, but backend calls are mocked/stubbed rather than hitting a real server
  4. Weigh maintenance cost — the ct packages are framework-specific (react/vue/svelte) and explicitly experimental, so expect API changes between Playwright versions
  5. Use both in combination: component tests for design-system/component-library coverage, E2E for critical, integration-dependent user journeys

Known gotchas

Related routes

Set up Playwright component testing for a React application with @playwright/experimental-ct-react
playwright.dev · 5 steps · unrated
set up playwright component testing for a vue application using experimental-ct-vue
playwright.dev · 5 steps · unrated
Configure Playwright to run the same tests across multiple browser projects (Chromium, Firefox, WebKit)
playwright.dev · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans