All skills
Skillintermediate
/run-e2e - Execute End-to-End Tests
Run end-to-end tests against the application using Playwright or Cypress.
Claude Code Knowledge Pack7/10/2026
Overview
/run-e2e - Execute End-to-End Tests
Run end-to-end tests against the application using Playwright or Cypress.
Steps
- Detect the e2e framework in use (Playwright, Cypress, or Selenium) by checking package.json and config files
- Verify the test configuration file exists (playwright.config.ts, cypress.config.js, etc.)
- Check if the application server is running; if not, identify the start command
- List all e2e test files matching the pattern
**/*.e2e.{ts,js}or**/*.spec.{ts,js}in the e2e/test directory - If a specific test file or pattern is provided, filter to those tests only
- Run the test suite with verbose output and capture results
- Parse test output for pass/fail counts and timing information
- For any failing tests, extract the error message, screenshot path, and stack trace
- Present a summary table: total tests, passed, failed, skipped, duration
- If failures exist, suggest fixes based on error patterns (timeout, selector, assertion)
Rules
- Always run tests in headless mode unless the user explicitly requests headed mode
- Set a default timeout of 30 seconds per test unless configured otherwise
- Capture screenshots on failure automatically
- Do not modify test files without explicit permission
- Report flaky tests if a test passes on retry but failed initially
- Ensure the base URL matches the running application port
- Clean up any test artifacts older than 7 days