Run Playwright test
run_playwright_testRuns a Playwright spec file and returns structured test results with status, failure details, diagnostics, and artifact paths for E2E debugging.
Instructions
Run a Playwright spec file in the target project and return a bounded, structured result: explicit status, counts, runner/process metadata, up to 5 failures with location, error type, recent steps, browser console errors, page errors and failed requests (from trace.zip and/or the scaffolded diagnostics fixture), screenshot/trace/video/error-context paths, and a compact qualityScore. The project's own reporters (HTML, Allure) keep running. Use detail:'full' or get_failure_details for more. TOKEN ECONOMY INSTRUCTION: In your response, provide a clean, compact 2–3 line summary (status, duration, video link, and failure cause) rather than dumping large markdown tables into chat. If tests fail, analyze the error and formulate a concrete fix proposal in '.page.ts'. To confirm with the user before applying fixes: 1) If an interactive question/selection tool is available in your environment (e.g. ask_question, vscode_askQuestions), MUST use it to present options: ['Apply Fix & Re-run', 'Review Diff First', 'Cancel']. 2) Otherwise, present the options as a clean numbered list in your response so the user can easily reply with just the number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Only run tests whose title matches this pattern (passed to --grep). | |
| detail | No | Response size. 'summary' (default) returns status, counts, up to 5 failures with bounded diagnostics and artifact paths. 'full' adds every test with retry attempts, runner stdout/stderr and the complete quality score. Prefer get_failure_details for one test. | |
| headed | No | Run in headed (visible browser) mode instead of headless. | |
| specPath | Yes | Path to the spec file, relative to project root or absolute, e.g. "e2e/payment.spec.ts". | |
| timeoutMs | No | Maximum runner duration in milliseconds (default 120000; allowed range 100–900000). | |
| projectRoot | No | Optional path to the target project root. If omitted, auto-detected by searching for playwright.config.*. | |
| generateHtmlReport | No | Set to true to generate the standalone visual quality report at test-results/quality-report.html. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tests | Yes | ||
| detail | Yes | ||
| runner | No | ||
| status | Yes | ||
| summary | Yes | ||
| failures | No | ||
| videoPath | No | ||
| durationMs | Yes | ||
| reportPath | No | ||
| projectRoot | Yes | ||
| runnerError | No | ||
| outputBudget | No | ||
| qualityScore | No | ||
| testsOmitted | No | ||
| traceZipPath | No | ||
| nativeReports | No | ||
| prerequisites | No | ||
| failuresOmitted | No | ||
| healingGateDirective | No | ||
| qualityReportHtmlPath | No | ||
| reportPromptDirective | No |