Playwright E2E Tests and Flake Repair
Build reliable Playwright tests, repair flakes from evidence, migrate suites, and configure faster, diagnosable CI.
Before & after
Same prompt, same agent — the only difference is the skill.
Playwright tests are a good way to catch regressions. You could write tests for important flows, set them up to run in CI, and adjust when things break. There are templates and examples out there. What flows are most important to test first?
PLAYWRIGHT TEST SUITE: CRITICAL FLOWS (3 test files): 1. SIGNUP → LOGIN → PAYMENT ✓ New user creation (email + password) ✓ Email verification click-through ✓ Login with valid credentials ✓ MFA code entry (if enabled) ✓ Billing page load + stripe integration ✓ Payment success and redirect 2. CONTENT CREATION → PUBLISH ✓ New post creation (title, description, image upload) ✓ Auto-save every 2 seconds ✓ Publish to live (date/time scheduling works) ✓ Post visible in feed after 30s 3. SOCIAL SHARE ✓ Copy social link to clipboard ✓ Open Twitter share intent (verify URL params) ✓ Email share opens mail client TEST FIXTURES (auto-setup): → Database: Insert test user + test post data → Auth: Issue valid session token (skip manual login) → Stripe: Mock payment endpoint (no real charges) CI/CD INTEGRATION: • Run on: Every PR + main branch commits • Parallelism: 4 workers (reduce 12m → 3m test time) • Fail strategy: Block merge if any test fails • Report: HTML dashboard showing pass/fail per flow FLAKY TEST HANDLING: → Screenshot on failure (debug visual state) → Retry once automatically (catch transient timing issues) → Alert if same test fails 2+ times in a row (underlying issue) TEMPLATES PROVIDED: • 55 pre-built test templates (form filling, navigation, API mocking) • 3 test agents (one for setup, one for data validation, one for performance) MAINTENANCE: Update tests when UI changes (selector drift is #1 pain point).
About this skill
“It passes locally but fails in CI” usually hides a race, shared data, or a test that checks the wrong signal. Get Playwright tests and repairs that connect each action to an observable application state, with diagnostic artifacts and an honest verification plan.
What it does
- Writes user-flow tests with accessible locators, retrying assertions, isolated fixtures, and meaningful outcomes.
- Diagnoses intermittent failures using traces, request evidence, worker behavior, and controlled reruns.
- Replaces sleeps and broad loading waits with the specific state or response the next action requires.
- Migrates Cypress or Selenium coverage while preserving test intent and accounting for different execution models.
- Configures workers, sharding, retries, browser dependencies, and failure artifacts for CI.
- Separates mocked UI coverage from real integration coverage so green tests support the right claims.
What you get
Right-sized test code, configuration, or a targeted repair, accompanied by assumptions and verification commands. For failures, you also get the suspected cause, evidence supporting it, and the smallest experiment that can confirm or reject it.
Best for
Developers and QA engineers maintaining Playwright suites, migrating existing browser tests, or investigating failures that appear only under CI load.
SKILL.md preview
---
name: playwright-e2e-tests-and-flake-repair
description: Builds and repairs Playwright Test suites using observable state transitions, isolated fixtures, trace-led diagnosis, and controlled CI verification. Use when the user says "write Playwright tests", "my tests pass locally but fail in CI", "this test keeps flaking", "replace these sleeps", "migrate our Cypress suite", "move Selenium tests to Playwright", or "speed up our end-to-end CI".
---
# Playwright E2E Tests and Flake Repair
… (sign up to view the full skill)More development skills
View all Development skills →React and Next.js Regression Test Coverage
Generate React and Next.js tests with Jest, Testing Library, MSW, and Playwright, prioritized by regression risk.
Pre-Ship Verification for Code Changes
Before calling a code change done, Claude grades every claim by evidence, tries to break it, and reports what's verified vs assumed.
TestRail Case and CI Result Sync
Sync automated tests to TestRail cases and scoped runs with stable mappings, retry handling, and verified result counts.
Claude Skill Validation and Quality Scoring
Audit SKILL.md structure, test supplied scripts, and get an evidence-backed grade, quality tier, and prioritized fixes.