Run E2E tests
run-testExecute Playwright E2E test suites and return pass/fail stats with each failure's file, line, kind, and message while diagnosing install, server, syntax, crash, and timeout problems.
Instructions
Run the project's Playwright tests: stats plus each failure's file:line, kind and message. Diagnoses missing installs, dead dev servers, syntax errors, crashes and timeouts (kills the tree, keeps partial results). Reports progress; background: true returns a run id for long suites. Runs are recorded for analyze-history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Extra Playwright flags from an allowlist, as --flag or --flag=value (e.g. --repeat-each=3, --shard=1/2, --trace=on) | |
| grep | No | Only run tests whose title matches this regex | |
| config | No | playwright.config path or 1-based index when the project has several configs | |
| headed | No | Run with a visible browser window | |
| browser | No | Playwright project name to run (matched against playwright.config projects) | |
| retries | No | ||
| workers | No | ||
| testFiles | No | Test files/directories relative to the project root; "file:line" is supported. Omit to run the whole suite. | |
| timeoutMs | No | Hard wall-clock limit for the whole run; the process tree is killed past it (default 120000) | |
| background | No | Return a run id at once; poll get-run-status | |
| lastFailed | No | Only re-run tests that failed in the previous run (Playwright --last-failed) — the fast fix → re-run loop | |
| projectRoot | No | Project directory; defaults to the server working directory | |
| testTimeoutMs | No | Per-test timeout passed to Playwright | |
| retryOnFailure | No | Auto retry failing tests once before reporting failure (default true; ignored when retries is set) |