run_tests
Run Playwright tests with configurable spec, browser, tag, timeout, and other options, returning structured test results.
Instructions
Run Playwright tests and return structured results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workingDirectory | No | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS. | |
| spec | No | Spec file path, e.g. tests/navigation.spec.ts | |
| browser | No | ||
| tag | No | Tag filter, e.g. @smoke or @regression | |
| timeout | No | Timeout in milliseconds for the whole test run. Defaults to 300000. | |
| wait | No | Wait for completion before returning. Defaults to true. Set false to start a background run and poll it with get_run_status. | |
| updateSnapshots | No | Update snapshot baselines. Playwright default is "missing"; "changed" updates differing + missing. | |
| headed | No | Run with a visible browser window. Omitting or setting false leaves playwright.config.ts intact — Playwright has no --no-headed flag, so false does not force headless when the config sets headed. | |
| workers | No | Number of parallel workers (positive integer). | |
| retries | No | Maximum retry count for flaky tests; 0 disables retries. | |
| maxFailures | No | Stop the run after this many failures. | |
| trace | No | Force Playwright tracing mode, overriding playwright.config.ts. |