playwright-e2e-mcp 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +175 -33
  2. package/dist/http.d.ts +1 -1
  3. package/dist/http.js +1 -1
  4. package/dist/server.d.ts +2 -2
  5. package/dist/server.js +31 -4
  6. package/dist/server.js.map +1 -1
  7. package/dist/tools/analyze-history.d.ts +12 -1
  8. package/dist/tools/analyze-history.js +89 -5
  9. package/dist/tools/analyze-history.js.map +1 -1
  10. package/dist/tools/audit-accessibility.d.ts +85 -0
  11. package/dist/tools/audit-accessibility.js +4 -1
  12. package/dist/tools/audit-accessibility.js.map +1 -1
  13. package/dist/tools/audit-performance.d.ts +333 -0
  14. package/dist/tools/audit-performance.js +377 -0
  15. package/dist/tools/audit-performance.js.map +1 -0
  16. package/dist/tools/compare-visual-state.d.ts +84 -0
  17. package/dist/tools/generate-e2e-test.d.ts +90 -0
  18. package/dist/tools/generate-e2e-test.js +223 -34
  19. package/dist/tools/generate-e2e-test.js.map +1 -1
  20. package/dist/tools/get-failure.js +2 -1
  21. package/dist/tools/get-failure.js.map +1 -1
  22. package/dist/tools/inspect-page.d.ts +94 -0
  23. package/dist/tools/inspect-page.js +42 -5
  24. package/dist/tools/inspect-page.js.map +1 -1
  25. package/dist/tools/load-report.d.ts +48 -0
  26. package/dist/tools/load-report.js +167 -0
  27. package/dist/tools/load-report.js.map +1 -0
  28. package/dist/tools/probe-script.d.ts +7 -0
  29. package/dist/tools/probe-script.js +256 -7
  30. package/dist/tools/probe-script.js.map +1 -1
  31. package/dist/tools/shared.d.ts +137 -2
  32. package/dist/tools/shared.js +151 -7
  33. package/dist/tools/shared.js.map +1 -1
  34. package/dist/tools/suggest-fix.d.ts +35 -1
  35. package/dist/tools/suggest-fix.js +197 -17
  36. package/dist/tools/suggest-fix.js.map +1 -1
  37. package/dist/tools/validate-selector.d.ts +84 -0
  38. package/dist/tools/validate-selector.js +7 -1
  39. package/dist/tools/validate-selector.js.map +1 -1
  40. package/dist/types/index.d.ts +28 -0
  41. package/dist/utils/report-parser.d.ts +28 -3
  42. package/dist/utils/report-parser.js +77 -11
  43. package/dist/utils/report-parser.js.map +1 -1
  44. package/dist/utils/run-history.d.ts +66 -3
  45. package/dist/utils/run-history.js +149 -3
  46. package/dist/utils/run-history.js.map +1 -1
  47. package/package.json +2 -2
  48. package/skill/playwright-e2e-mcp/SKILL.md +71 -15
  49. package/skill/playwright-e2e-mcp/references/setup.md +1 -1
  50. package/skill/playwright-e2e-mcp/references/tools.md +67 -6
package/README.md CHANGED
@@ -40,9 +40,13 @@ run-test ──▶ get-failure ──▶ suggest-fix (apply + re-run) ──▶
40
40
  | 🔍 | "Why did this fail?" | Reads Playwright's trace: the page at the moment of failure, the broken request, the console error. No guessing. |
41
41
  | 🛠️ | "Fix it" | Swaps in a locator proven unique on the page, **re-runs the test**, and undoes the edit if it's still red. If the button is really gone, it tells you it's an app bug instead of hiding it. |
42
42
  | 🎲 | "Is this test flaky?" | Re-runs it many ways (repeated, alone, in random order) and names the exact test and seed that cause the flake. |
43
- | 📈 | "What's been breaking lately?" | Keeps a local run history and separates flaky, newly broken and always-broken tests. |
43
+ | 📈 | "What's been breaking lately?" | Keeps a local run history and separates flaky, newly broken and always-broken tests; shows the slowest tests, stability by day and **the commit where each test went bad**. |
44
+ | ☁️ | "Why did CI fail?" | Loads the CI job's report (or merges sharded blob reports), maps its paths onto your checkout and finds the traces in the downloaded artifact, so the same diagnosis and fixes work on CI failures. |
45
+ | ✍️ | "Write a test for this flow" | Walks the steps on the live page first, writes a spec that replays them with assertions on where the flow landed (URL and accessibility snapshot), and runs it once to prove it passes. |
44
46
  | ♿ | "Check this page for accessibility" | Runs axe-core (WCAG 2.2 AA) and returns each problem with a ready-to-paste locator and regression test. |
45
- | 🔐 | "Test the page after login" | Works behind sign-in with saved sessions, headers and click/fill steps. |
47
+ | ⚡ | "Why is this page slow?" | Measures Web Vitals (LCP, CLS, INP, TBT) on desktop or a throttled phone, names the slow element and the elements that jump, and hands back a budget test. |
48
+ | 🧪 | "Show me the error state" | Mocks API responses (500s, empty lists, slow calls) so the AI can inspect, audit or measure states that are hard to reach. |
49
+ | 🔐 | "Test the page after login" | Works behind sign-in with saved sessions, headers and click/fill steps, in Chromium, Firefox or WebKit, and can record or replay network traffic from a HAR file. |
46
50
  | 🤖 | "Do it in CI" | A [GitHub Action and `ci` command](#ci-github-action-and-ci-command) post the diagnosis, flaky verdict and fix diffs on your PR. |
47
51
 
48
52
  **Why it stands out**
@@ -83,8 +87,16 @@ run-test ──▶ get-failure ──▶ suggest-fix (apply + re-run) ──▶
83
87
  flaky, regressed and broken tests from the local run record.
84
88
  - **Accessibility.** `audit-accessibility` runs axe-core against WCAG 2.2 AA on any page,
85
89
  signed in or after steps, with offending elements as verified locators.
86
- - **Pages behind a login.** Every page tool accepts a Playwright `storageState`, extra
87
- headers, and click/fill steps to reach a modal or a later step.
90
+ - **Performance.** `audit-performance` measures lab Web Vitals (LCP, CLS, TBT, FCP, TTFB, and
91
+ INP for the interactions in `actions`), optionally as a throttled phone and as the median of
92
+ several runs, rates them against Google's thresholds or your budgets, and names the LCP
93
+ element and the elements that shifted as verified locators.
94
+ - **Ambiguous locators.** When a locator suddenly matches two elements (strict mode
95
+ violation), `suggest-fix` takes the unique locator Playwright reports for the intended
96
+ match: the exact-name one, or the one you pick.
97
+ - **Pages behind a login, in any state.** Every page tool accepts a Playwright
98
+ `storageState`, extra headers, click/fill steps to reach a modal or a later step, and
99
+ network mocks to force error, empty and slow states.
88
100
 
89
101
  </details>
90
102
 
@@ -139,7 +151,7 @@ npx -y playwright-e2e-mcp init # --client all | cursor,vscode … ·
139
151
  | **Skill only, any agent** | `npx skills add xsignon-secure/E2E` |
140
152
  | **npm (canonical, fastest)** | `npx -y playwright-e2e-mcp` |
141
153
  | **MCP Registry** (registry-aware clients discover it automatically) | `io.github.xsignon-secure/E2E` — [listing](https://registry.modelcontextprotocol.io/) |
142
- | **Any client, no npm account needed** | `npx -y github:xsignon-secure/E2E#v0.4.2` (pin a release tag) |
154
+ | **Any client, no npm account needed** | `npx -y github:xsignon-secure/E2E#v0.5.0` (pin a release tag) |
143
155
  | **Claude Desktop, zero Node setup** | double-click the [`.mcpb` extension](https://github.com/xsignon-secure/E2E/releases) |
144
156
  | **Remote-only clients (ChatGPT connectors)** | `https://playwright-e2e-mcp.vercel.app/api/mcp` |
145
157
 
@@ -151,7 +163,7 @@ code --add-mcp '{"name":"playwright-e2e","command":"npx","args":["-y","playwrigh
151
163
  ```
152
164
 
153
165
  Only need the fix loop? `--tools=core` (or `PW_MCP_TOOLS=core`) exposes six tools and
154
- halves the tool-definition context; see [Configuration](#configuration).
166
+ cuts the tool-definition context by about three quarters; see [Configuration](#configuration).
155
167
 
156
168
  Details and per-client config: [Installation](#installation) ·
157
169
  [MCP client configuration](#mcp-client-configuration).
@@ -165,30 +177,53 @@ Details and per-client config: [Installation](#installation) ·
165
177
  | `run-test` | Run Playwright tests and return stats, failures, diagnostics and hints; reports progress, and `background: true` returns a run id for long suites |
166
178
  | `get-run-status` | Progress or final result of a background run; can wait for it or cancel it |
167
179
  | `get-failure` | Deep analysis of one failure: stack, expected/actual, **DOM snapshot at failure (from the Playwright trace)**, failed requests, console errors, next steps |
168
- | `suggest-fix` | Patch a failure: a drifted locator is replaced with one **proven unique** on the DOM at failure, changed copy gets the new expected text; `apply: true` writes it, re-runs the test and reverts if still red |
169
- | `inspect-page` | Open a URL headlessly (optionally signed in, after steps) and return elements with **verified Playwright locators**, CSS selectors, visibility, text and console output |
180
+ | `load-report` | Load a run from CI: a JSON report or a folder of sharded blob reports; CI paths are mapped onto the checkout and traces found in the unpacked artifact, so `get-failure`, `suggest-fix` and `diagnose-flaky` work on it, and the run joins the history with its commit |
181
+ | `suggest-fix` | Patch a failure: a drifted locator is replaced with one **proven unique** on the DOM at failure, an ambiguous one (strict mode violation) gets the unique locator of the intended match, changed copy gets the new expected text; `apply: true` writes it, re-runs the test and reverts if still red |
182
+ | `inspect-page` | Open a URL headlessly (optionally signed in, after steps) and return elements with **verified Playwright locators**, CSS selectors, visibility, text and console output, or the **accessibility snapshot with a ready `toMatchAriaSnapshot` assertion** |
170
183
  | `list-tests` | List available tests (`file`, `line`, full title, projects) with filtering |
171
184
  | `validate-selector` | Check a CSS selector, Playwright selector or **locator expression** against a live page: validity, match count, and a sturdier verified locator for each match |
172
- | `generate-e2e-test` | Scaffold a Playwright test from a description using the project's **real** selectors and verified locators from the live page |
185
+ | `generate-e2e-test` | Scaffold a Playwright test from a description using the project's **real** selectors and verified locators from the live page, or **walk a flow** step by step on the live page and write a spec that is run once to prove it passes |
173
186
  | `compare-visual-state` | Visual regression: screenshot before/after a change and report *what* moved and how colors shifted |
174
187
  | `audit-accessibility` | Run axe-core (WCAG 2.2 AA by default) on a page, signed in or after steps, and return violations worst first with **verified locators** for the offending elements and a regression check |
188
+ | `audit-performance` | Measure lab **Web Vitals** (LCP, CLS, TBT, FCP, TTFB, INP during steps), optionally as a throttled phone and the median of several runs; rate them or check budgets, name the LCP and shifting elements as verified locators, list heavy and render-blocking requests, and return a budget test |
175
189
  | `diagnose-flaky` | Run a failing test 2–10 times **with retries disabled** and return an evidence verdict: `CONSISTENTLY FAILING`, `FLAKY` or `NOT REPRODUCING`; tells parallelism and **test-order** bugs from races |
176
- | `analyze-history` | Rank flaky, regressed and broken tests from the local run history, group failures by cause, or show one test's timeline |
190
+ | `analyze-history` | Rank flaky, regressed and broken tests from the local run history, group failures by cause, list the slowest tests, show stability by day, name **the commit where each test went bad**, or show one test's timeline |
177
191
 
178
192
  Two **prompts** package the main workflows for clients that show them as slash commands:
179
193
  `fix-failing-test` (optional `test`) and `triage-flaky-tests`.
180
194
 
181
195
  ### Page state: signed-in pages, headers and steps
182
196
 
183
- `inspect-page`, `validate-selector` and `compare-visual-state` accept the same page-state
184
- arguments (`suggest-fix` accepts `storageState` and `headers` for a live `url`):
197
+ `inspect-page`, `validate-selector`, `compare-visual-state`, `audit-accessibility` and
198
+ `audit-performance` accept the same page-state arguments (`suggest-fix` accepts
199
+ `storageState` and `headers` for a live `url`):
185
200
 
186
201
  | Argument | Type | Description |
187
202
  | --- | --- | --- |
188
203
  | `storageState` | string | Path inside the project to a Playwright storageState JSON (cookies + localStorage), e.g. `playwright/.auth/user.json` from your setup project. Defaults to `PW_MCP_STORAGE_STATE` |
189
204
  | `headers` | object | Extra HTTP headers for every request, e.g. `{ "Authorization": "Bearer …" }` |
190
205
  | `actions` | array | Up to 20 steps run after load: `{ "type": "click" \| "dblclick" \| "hover" \| "fill" \| "press" \| "check" \| "uncheck" \| "select" \| "wait" \| "goto", "locator"?, "value"?, "url"?, "ms"? }`. Locators use Playwright syntax, e.g. `getByRole('button', { name: 'Open settings' })` |
206
+ | `routes` | array | Up to 20 network mocks applied before the page loads, first match wins: `{ "url": "**/api/cart", "method"?, "status"?, "json"? \| "body"?, "contentType"?, "headers"?, "abort"?, "delayMs"? }`. `json`, `body` or `status` fulfils the request, `abort: true` fails it, and `delayMs` alone slows the real request |
191
207
  | `viewport` | object | `{ "width": 390, "height": 844 }` (default 1280×720) |
208
+ | `har` | object | `{ "path": "tests/fixtures/cart.har", "mode"?: "replay" \| "record", "url"?: "**/api/**", "notFound"?: "abort" \| "fallback" }`. `replay` (default) answers matching requests from the file, `record` saves the page's traffic to it. The file and its folder must be inside the project. `routes` mocks still win over the HAR |
209
+ | `browser` | `chromium` \| `firefox` \| `webkit` | Browser engine (default `chromium`; the engine must be installed with `npx playwright install`). `audit-performance` is Chromium-only, and WebKit is refused while private addresses are blocked |
210
+
211
+ Mocks make states that are hard to reach easy to inspect, audit or measure: the error
212
+ banner after a 500, the empty list, the spinner of a slow API, the page without a
213
+ third-party script. The response says how many requests each mock handled and flags a mock
214
+ that matched nothing, which usually means a wrong glob:
215
+
216
+ ```json
217
+ "routes": [
218
+ { "url": "**/api/cart", "json": { "items": [] } },
219
+ { "url": "**/api/checkout", "method": "POST", "status": 500, "body": "boom" },
220
+ { "url": "**/googletagmanager.com/**", "abort": true }
221
+ ]
222
+ ```
223
+
224
+ A HAR makes a page repeatable: record it once against a working backend
225
+ (`"mode": "record"`), then replay it so the page renders the same data offline or in CI.
226
+ The same file works in a spec with `page.routeFromHAR()`.
192
227
 
193
228
  A failing step reports which one failed and how many ran. When the page lands on a login
194
229
  screen, the response says so and suggests `storageState`.
@@ -264,7 +299,7 @@ numbered next steps (re-run this single test by `file:line`, headed/debug mode,
264
299
  | Argument | Type | Description |
265
300
  | --- | --- | --- |
266
301
  | `url` | string | Full http(s) URL to open (required) |
267
- | `view` | `elements` \| `locators` | `locators` returns a compact map of interactive elements with verified locators (cheapest); `elements` (default) the DOM inventory |
302
+ | `view` | `elements` \| `locators` \| `aria` | `locators` returns a compact map of interactive elements with verified locators (cheapest); `aria` the accessibility snapshot of the page (or of `selector`) with a ready `toMatchAriaSnapshot` assertion; `elements` (default) the DOM inventory |
268
303
  | `projectRoot` | string | Project whose Playwright launches the browser |
269
304
  | `selector` | string | Inspect matches of this selector instead of the whole DOM |
270
305
  | `waitFor` | string | Wait for a selector (CSS or `text=…`) before inspecting |
@@ -272,7 +307,7 @@ numbered next steps (re-run this single test by `file:line`, headed/debug mode,
272
307
  | `includeHtml` | boolean | Include the rendered HTML (capped) |
273
308
  | `maxHtmlChars` | number | HTML cap, default `20000` |
274
309
  | `timeoutMs` | number | Overall limit, default `45000` |
275
- | `storageState` / `headers` / `actions` / `viewport` | — | [Page state](#page-state-signed-in-pages-headers-and-steps) |
310
+ | `storageState` / `headers` / `actions` / `routes` / `har` / `browser` / `viewport` | — | [Page state](#page-state-signed-in-pages-headers-and-steps) |
276
311
 
277
312
  Each element comes with Playwright locators that were **checked on the page** to resolve to
278
313
  exactly that element, best first (role + accessible name, test id, label, placeholder, text,
@@ -284,6 +319,16 @@ captured, errors first. A locator map looks like:
284
319
  2. `getByLabel('Search')` — searchbox "Search"
285
320
  ```
286
321
 
322
+ `view: "aria"` returns the page's structure as Playwright sees it, and the assertion that
323
+ locks it in a test:
324
+
325
+ ```ts
326
+ await expect(page.locator("#cart")).toMatchAriaSnapshot(`
327
+ - list:
328
+ - listitem: Real item
329
+ `);
330
+ ```
331
+
287
332
  ### `list-tests`
288
333
 
289
334
  | Argument | Type | Description |
@@ -326,9 +371,35 @@ advice, or `❌ INVALID` with the parse error.
326
371
  | `write` | boolean | Write the file to disk (default `true`) |
327
372
  | `overwrite` | boolean | Replace an existing spec at the target path; only specs this tool generated can be replaced |
328
373
  | `liveInspect` | boolean | Cross-check selectors against the live page (default on when a URL is known) |
374
+ | `steps` | array | **Walk the flow**: up to 30 steps in the [`actions`](#page-state-signed-in-pages-headers-and-steps) format, run on the live page before anything is written |
375
+ | `assertScope` | string | With `steps`: CSS scope of the end-state accessibility snapshot (default `body`) |
376
+ | `storageState` | string | With `steps`: signed-in session for the walk; the spec uses it too (`test.use`) |
377
+ | `verify` / `project` / `timeoutMs` | — | With `steps`: run the written spec once (default `true`), in this Playwright project |
329
378
  | `projectRoot` / `config` | string | As with the other tools |
330
379
 
331
- Reads the agent's recent changes (`git status`, falling back to `git diff HEAD~1`,
380
+ **With `steps`**, the tool walks the flow on the live page first. If a step's locator does
381
+ not work, it stops there, writes nothing and says which step failed. Otherwise it writes a
382
+ spec that replays the steps, asserts the URL path and the accessibility snapshot where the
383
+ flow landed (headings only when the snapshot is long), and runs it once:
384
+
385
+ ```ts
386
+ test('rename in settings', async ({ page }) => {
387
+ await page.goto('http://localhost:3000/account');
388
+ await page.getByRole('button', { name: 'Open settings' }).click();
389
+ await page.getByLabel('Nickname').fill('Ada');
390
+
391
+ // End state
392
+ await expect(page.locator("dialog")).toMatchAriaSnapshot(`
393
+ - dialog:
394
+ - heading "Settings" [level=2]
395
+ - text: Nickname
396
+ - textbox "Nickname": Ada
397
+ - button "Save settings"
398
+ `);
399
+ });
400
+ ```
401
+
402
+ **Without `steps`**, it reads the agent's recent changes (`git status`, falling back to `git diff HEAD~1`,
332
403
  then recent mtimes), extracts the locators those files actually declare
333
404
  (`data-testid`, `getByRole`, `aria-label`, `placeholder`, `id`, `name`, element text),
334
405
  ranks verified-live selectors first, writes a spec built from them, and reports each
@@ -441,6 +512,47 @@ Example output:
441
512
 
442
513
  It ends with an `@axe-core/playwright` check for the spec, so the page stays fixed.
443
514
 
515
+ ### `audit-performance`
516
+
517
+ | Argument | Type | Description |
518
+ | --- | --- | --- |
519
+ | `url` | string | Page to measure (required) |
520
+ | `throttle` | `none` \| `mobile` | `mobile` is Lighthouse's phone preset: 412×823 touch viewport, 4x CPU slowdown, slow 4G. Default `none` (desktop, unthrottled) |
521
+ | `cpuSlowdown` | number | Override the CPU slowdown factor (1–20) |
522
+ | `runs` | number | Load the page 1–5 times and report the median (default `1`); the LCP range is shown |
523
+ | `budgets` | object | `{ lcpMs, cls, inpMs, tbtMs, fcpMs, ttfbMs, transferKb, requests }`, any subset. With budgets the verdict is pass/fail; without, metrics are rated against Google's thresholds |
524
+ | `settleMs` | number | Keep observing after load for late images and shifts (default `1500`) |
525
+ | `waitFor` / `waitUntil` / `timeoutMs` | — | As with `inspect-page` (`waitUntil` default `load`, `timeoutMs` per run, default `60000`) |
526
+ | `storageState` / `headers` / `actions` / `routes` / `viewport` | — | [Page state](#page-state-signed-in-pages-headers-and-steps). Clicks and key presses in `actions` are measured as interactions (INP) |
527
+
528
+ The metrics come from the browser's own performance entries (the same ones Lighthouse and
529
+ the `web-vitals` library read) and the bytes from the DevTools protocol, so cross-origin
530
+ sizes count too. Example output:
531
+
532
+ ```
533
+ ## ⚡ 3 of 6 metrics need work (CLS, INP, TBT)
534
+
535
+ | Metric | Value | Rating |
536
+ | --- | --- | --- |
537
+ | LCP · largest contentful paint | 412 ms | 🟢 good |
538
+ | CLS · cumulative layout shift | 0.109 | 🟠 needs improvement |
539
+ | INP · slowest interaction (lab) | 360 ms | 🟠 needs improvement |
540
+ | TBT · total blocking time | 306 ms | 🟠 needs improvement |
541
+
542
+ ### What to fix
543
+ - **CLS 0.109**: these moved: `getByRole('img', { name: 'Summer sale' })`, `getByRole('button', { name: 'Add to cart' })`. Reserve their space (…)
544
+ - **TBT 306 ms** from 2 long task(s), the longest 404 ms: split or defer JavaScript.
545
+ - **INP 360 ms** on pointerdown on button: the handler blocks the next paint; yield (…)
546
+
547
+ ### Network
548
+ **Transfer:** 302 kB in 4 requests · DOM: 13 nodes · JS heap: 10.0 MB
549
+ **Render-blocking:**
550
+ - stylesheet `http://localhost:4173/style.css` · 324 ms
551
+ ```
552
+
553
+ It ends with a Playwright test that asserts LCP and CLS stay within budget. These are lab
554
+ numbers from one headless Chromium; field data (CrUX, RUM) can differ.
555
+
444
556
  ### `suggest-fix`
445
557
 
446
558
  | Argument | Type | Description |
@@ -449,12 +561,18 @@ It ends with an `@axe-core/playwright` check for the spec, so the page stays fix
449
561
  | `apply` | boolean | Write the fix into the spec (default `false`: return the diff only) |
450
562
  | `verify` | boolean | After applying, re-run the test and revert the file if it still fails (default `true`) |
451
563
  | `allowExpectationUpdate` | boolean | Allow applying a changed expected text/value (default `false`, since it can hide a real regression) |
564
+ | `candidate` | number | For a strict mode violation, which of the listed matches the test meant (1-based) |
452
565
  | `url` | string | Heal against this live page instead of the DOM snapshot in the failure trace |
453
566
  | `storageState` / `headers` | — | For `url`, as in [Page state](#page-state-signed-in-pages-headers-and-steps) |
454
567
  | `config` / `timeoutMs` / `projectRoot` | — | As with `run-test` |
455
568
 
456
- Two kinds of fix:
569
+ Three kinds of fix:
457
570
 
571
+ - **Ambiguous locator.** A strict mode violation ("resolved to 2 elements") lists each match
572
+ with the unique locator Playwright computed for it. When the broken locator matched by
573
+ substring (`name: 'Save'` hitting *Save* and *Save draft*), the exact-name match is picked
574
+ with `high` confidence. When the matches are equal (the same *Home* link in the header and
575
+ the footer), they are listed and you choose with `candidate`.
458
576
  - **Locator drift.** The broken locator is read from the error, its words are matched
459
577
  (with synonyms such as *btn → button*, *checkout → proceed to checkout*) against every
460
578
  element in the DOM at failure, and the best match's verified-unique locator replaces it.
@@ -484,17 +602,38 @@ the full `run-test` result, which also becomes the last run for `get-failure` an
484
602
 
485
603
  | Argument | Type | Description |
486
604
  | --- | --- | --- |
487
- | `view` | `flaky` \| `patterns` \| `test` | `flaky` (default) ranks unstable tests; `patterns` groups failures by kind and normalized error; `test` shows one test's timeline |
605
+ | `view` | `flaky` \| `patterns` \| `slow` \| `trend` \| `commits` \| `test` | `flaky` (default) ranks unstable tests; `patterns` groups failures by kind and normalized error; `slow` lists tests by median duration and flags ones that got slower; `trend` shows failed and flaky executions per day; `commits` names the first bad commit of each failing or flaky test; `test` shows one test's timeline |
488
606
  | `test` | string | Substring of a test's file or title (filters every view) |
489
607
  | `lastRuns` | number | How many recent runs to analyze (default `30`) |
490
608
  | `limit` | number | Max rows (default `15`) |
491
609
 
492
- Every `run-test`, `diagnose-flaky` and `suggest-fix` run appends a line to
610
+ Every `run-test`, `diagnose-flaky`, `suggest-fix` and `load-report` run appends a line to
493
611
  `<project>/.playwright-e2e-mcp/history.jsonl` (the folder carries its own `.gitignore`;
494
612
  nothing leaves the machine; `PW_MCP_HISTORY=0` turns it off). The flaky view separates
495
613
  tests that flip between pass and fail, tests that started failing and stayed red
496
614
  (regressed), and tests that failed every run (broken), each with a `PFFP~` timeline.
497
615
 
616
+ Each run records the commit it tested (from git locally, from the report's metadata for CI
617
+ runs). The `commits` view uses that to say where a test went bad: the first failing or flaky
618
+ run after its last streak of passes, with the last good commit and a `git diff` to compare
619
+ them.
620
+
621
+ ### `load-report`
622
+
623
+ | Argument | Type | Description |
624
+ | --- | --- | --- |
625
+ | `report` | string | A Playwright JSON report inside the project (e.g. `ci-artifacts/results.json`), or a folder of blob-report zips from sharded jobs (merged with the project's `playwright merge-reports`) (required) |
626
+ | `traceDirs` | string[] | Folders inside the project where the job's `test-results` artifact was unpacked (default: the report's folder and its parent) |
627
+ | `commit` / `branch` | string | Override what the report's metadata says (Playwright records it with `captureGitInfo` or on CI) |
628
+ | `record` | boolean | Add the run to the history (default `true`) |
629
+ | `timeoutMs` | number | Limit for merging blob reports (default `120000`) |
630
+
631
+ Download the artifacts first, for example with
632
+ `gh run download <run-id> -n playwright-report -D ci-artifacts`. The CI machine's absolute
633
+ paths are mapped onto your checkout, so failures point at local files and get-failure can
634
+ open each trace. The run becomes the last run, so the usual loop works on it: `get-failure`,
635
+ then `suggest-fix` (which re-runs the fix locally), or `diagnose-flaky`.
636
+
498
637
  ---
499
638
 
500
639
  ## Installation
@@ -510,8 +649,8 @@ builds `dist/` automatically on install). Pin a release tag: an unpinned
510
649
  `github:xsignon-secure/E2E` runs whatever is on the default branch at that moment.
511
650
 
512
651
  ```bash
513
- npx -y github:xsignon-secure/E2E#v0.4.2
514
- npm install -D github:xsignon-secure/E2E#v0.4.2 @playwright/test # or as a project dependency
652
+ npx -y github:xsignon-secure/E2E#v0.5.0
653
+ npm install -D github:xsignon-secure/E2E#v0.5.0 @playwright/test # or as a project dependency
515
654
  npx playwright install chromium
516
655
  ```
517
656
 
@@ -519,7 +658,7 @@ Or grab the packaged tarball from the repo's **GitHub Releases** page and instal
519
658
  it locally:
520
659
 
521
660
  ```bash
522
- npm install -D https://github.com/xsignon-secure/E2E/releases/download/v0.4.2/playwright-e2e-mcp-0.4.2.tgz
661
+ npm install -D https://github.com/xsignon-secure/E2E/releases/download/v0.5.0/playwright-e2e-mcp-0.5.0.tgz
523
662
  ```
524
663
 
525
664
  Listed in the **official [MCP Registry](https://registry.modelcontextprotocol.io/)** as
@@ -535,7 +674,7 @@ Listed in the **official [MCP Registry](https://registry.modelcontextprotocol.io
535
674
  "mcpServers": {
536
675
  "playwright-e2e": {
537
676
  "command": "npx",
538
- "args": ["-y", "github:xsignon-secure/E2E#v0.4.2"],
677
+ "args": ["-y", "github:xsignon-secure/E2E#v0.5.0"],
539
678
  "env": { "PW_MCP_PROJECT_ROOT": "/absolute/path/to/your/project" }
540
679
  }
541
680
  }
@@ -551,8 +690,8 @@ when the client launches it somewhere else (e.g. your home directory).
551
690
  **Codex / VS Code / Copilot CLIs:**
552
691
 
553
692
  ```bash
554
- codex mcp add playwright-e2e -- npx -y github:xsignon-secure/E2E#v0.4.2
555
- code --add-mcp '{"name":"playwright-e2e","command":"npx","args":["-y","github:xsignon-secure/E2E#v0.4.2"]}'
693
+ codex mcp add playwright-e2e -- npx -y github:xsignon-secure/E2E#v0.5.0
694
+ code --add-mcp '{"name":"playwright-e2e","command":"npx","args":["-y","github:xsignon-secure/E2E#v0.5.0"]}'
556
695
  ```
557
696
 
558
697
  Codex's defaults fight this server: the first launch clones the repo and runs
@@ -563,7 +702,7 @@ Codex's defaults fight this server: the first launch clones the repo and runs
563
702
  ```toml
564
703
  [mcp_servers.playwright-e2e]
565
704
  command = "npx"
566
- args = ["-y", "github:xsignon-secure/E2E#v0.4.2"]
705
+ args = ["-y", "github:xsignon-secure/E2E#v0.5.0"]
567
706
  startup_timeout_sec = 60
568
707
  tool_timeout_sec = 600
569
708
  ```
@@ -578,7 +717,7 @@ into `PW_MCP_PROJECT_ROOT`, so the tools point at a real project from the first
578
717
  **Claude Code:**
579
718
 
580
719
  ```bash
581
- claude mcp add playwright-e2e -- npx -y github:xsignon-secure/E2E#v0.4.2
720
+ claude mcp add playwright-e2e -- npx -y github:xsignon-secure/E2E#v0.5.0
582
721
  ```
583
722
 
584
723
  **Gemini CLI / Qwen Code:** paste the `mcpServers` block above into
@@ -733,7 +872,7 @@ steps:
733
872
  - uses: actions/setup-node@v6
734
873
  with: { node-version: 24 }
735
874
  - run: npm ci && npx playwright install --with-deps chromium
736
- - uses: xsignon-secure/E2E@v0.4.2
875
+ - uses: xsignon-secure/E2E@v0.5.0
737
876
  with:
738
877
  flaky-runs: 3 # 0 skips the flaky verdict
739
878
  suggest: 2 # suggest-fix diffs for the first 2 failures
@@ -760,7 +899,7 @@ browsers match Playwright 1.63. Mount your project at `/work`; its own
760
899
  | Environment variable | Default | Purpose |
761
900
  | --- | --- | --- |
762
901
  | `PW_MCP_PROJECT_ROOT` | server cwd | Default project root for every tool |
763
- | `PW_MCP_TOOLS` | all | Which tools to expose, as tool names and/or profiles, comma separated (same as the `--tools=` flag). Profiles: `core` (run, status, failure, fix, flaky, list), `triage` (run, status, failure, flaky, history, list), `inspect` (page, selector, accessibility, visual), `author` (list, page, selector, generate, run). All twelve tool definitions cost about 5.5k tokens of context per request; `core` costs about 2.2k |
902
+ | `PW_MCP_TOOLS` | all | Which tools to expose, as tool names and/or profiles, comma separated (same as the `--tools=` flag). Profiles: `core` (run, status, failure, fix, flaky, list), `triage` (run, status, failure, CI report, flaky, history, list), `inspect` (page, selector, accessibility, performance, visual), `author` (list, page, selector, generate, run). All fourteen tool definitions cost about 9k tokens of context per request; `core` costs about 2.3k |
764
903
  | `PW_MCP_STORAGE_STATE` | — | Default `storageState` file (inside the project) for the page tools |
765
904
  | `PW_MCP_SHUFFLE_SEEDS` | random | Comma-separated seeds for `diagnose-flaky`'s `order` pass, to replay the orders a diagnosis reported |
766
905
  | `PW_MCP_HISTORY` | on | `0` stops recording runs to `.playwright-e2e-mcp/history.jsonl` |
@@ -878,7 +1017,7 @@ picks the right locator from the snapshot on the first try, which the server doe
878
1017
  src/
879
1018
  ├── index.ts # bin entry point (--version/--help, main-module guard)
880
1019
  ├── server.ts # McpServer setup, tool registration, shutdown handling
881
- ├── tools/ # the twelve tools, the probe script + shared plumbing
1020
+ ├── tools/ # the fourteen tools, the probe script + shared plumbing
882
1021
  ├── prompts.ts # fix-failing-test, triage-flaky-tests
883
1022
  ├── utils/ # playwright-runner, report-parser, project-detector, path-utils,
884
1023
  │ # logger, trace-reader (trace.zip → DOM/network/console),
@@ -927,10 +1066,13 @@ server over stdio against a live fixture app and a Playwright project under
927
1066
  `e2e/fixture/`, then drives it exactly like an MCP client and asserts ~40 behaviours
928
1067
  that only appear end-to-end:
929
1068
 
930
- - initialize handshake, 12 tools, 2 prompts, spec tool annotations and object input schemas,
1069
+ - initialize handshake, 14 tools, 2 prompts, spec tool annotations and object input schemas,
931
1070
  - verified locators, locator validation, signed-in pages (`storageState`) and page steps,
932
1071
  - background runs with progress, run history views, and `suggest-fix` healing a drifted
933
- locator and verifying it with a re-run (and refusing when the element is missing),
1072
+ locator and an ambiguous one, verifying each with a re-run (and refusing when the
1073
+ element is missing),
1074
+ - Web Vitals with budgets and phone throttling, and network mocks that force error and
1075
+ empty states,
934
1076
  - live DOM inspection, CSS selector validation (matches, zero matches, engine
935
1077
  syntax, parse errors), dead-server detection,
936
1078
  - visual regression: baseline → unchanged compare → `blue → red` diff detection,
@@ -1031,8 +1173,8 @@ job requests for itself; if it is refused, the run names the setting to change.
1031
1173
  ### Verifying a published release
1032
1174
 
1033
1175
  ```bash
1034
- git checkout v0.4.2 && npm ci && npm run mcpb
1035
- npm run release:verify -- v0.4.2
1176
+ git checkout v0.5.0 && npm ci && npm run mcpb
1177
+ npm run release:verify -- v0.5.0
1036
1178
  ```
1037
1179
 
1038
1180
  The release notes promise that the tag rebuilds the published bundle byte for
package/dist/http.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * verified locally before it is deployed.
11
11
  *
12
12
  * The stdio transport in server.ts is untouched; this is an additional way to
13
- * reach the same twelve tools.
13
+ * reach the same fourteen tools.
14
14
  */
15
15
  import type { IncomingMessage, ServerResponse } from 'node:http';
16
16
  import type { McpHttpHandler } from '@modelcontextprotocol/server';
package/dist/http.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * verified locally before it is deployed.
11
11
  *
12
12
  * The stdio transport in server.ts is untouched; this is an additional way to
13
- * reach the same twelve tools.
13
+ * reach the same fourteen tools.
14
14
  */
15
15
  import { createHash, timingSafeEqual } from 'node:crypto';
16
16
  import { createMcpHandler, hostHeaderValidationResponse } from '@modelcontextprotocol/server';
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MCP server setup: creates the McpServer instance, registers the twelve
2
+ * MCP server setup: creates the McpServer instance, registers the fourteen
3
3
  * tools (with spec tool annotations) and the workflow prompts, and wires
4
4
  * each invocation to a ToolContext (per-tool logger, abort signal, progress
5
5
  * reporter, shared store, default project root).
@@ -31,7 +31,7 @@ export interface CreateServerOptions {
31
31
  export declare const READ_ONLY_TOOLS: readonly string[];
32
32
  /**
33
33
  * Named tool sets for PW_MCP_TOOLS / --tools. Every tool definition costs
34
- * context on each request (all twelve are ~5.6k tokens), so a client that
34
+ * context on each request (all fourteen are ~9k tokens), so a client that
35
35
  * only fixes failing suites can load the core loop alone.
36
36
  */
37
37
  export declare const TOOL_PROFILES: Readonly<Record<string, readonly string[]>>;
package/dist/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MCP server setup: creates the McpServer instance, registers the twelve
2
+ * MCP server setup: creates the McpServer instance, registers the fourteen
3
3
  * tools (with spec tool annotations) and the workflow prompts, and wires
4
4
  * each invocation to a ToolContext (per-tool logger, abort signal, progress
5
5
  * reporter, shared store, default project root).
@@ -20,12 +20,14 @@ import { inspectPageTool } from './tools/inspect-page.js';
20
20
  import { listTestsTool } from './tools/list-tests.js';
21
21
  import { validateSelectorTool } from './tools/validate-selector.js';
22
22
  import { auditAccessibilityTool } from './tools/audit-accessibility.js';
23
+ import { auditPerformanceTool } from './tools/audit-performance.js';
23
24
  import { generateE2ETestTool } from './tools/generate-e2e-test.js';
24
25
  import { compareVisualStateTool } from './tools/compare-visual-state.js';
25
26
  import { diagnoseFlakyTool } from './tools/diagnose-flaky.js';
26
27
  import { suggestFixTool } from './tools/suggest-fix.js';
27
28
  import { analyzeHistoryTool } from './tools/analyze-history.js';
28
29
  import { getRunStatusTool } from './tools/get-run-status.js';
30
+ import { loadReportTool } from './tools/load-report.js';
29
31
  import { registerPrompts } from './prompts.js';
30
32
  const require = createRequire(import.meta.url);
31
33
  function readVersion() {
@@ -76,6 +78,19 @@ const TOOLS = [
76
78
  },
77
79
  handler: getFailureTool.handler,
78
80
  },
81
+ {
82
+ ...loadReportTool,
83
+ title: 'Load a CI report',
84
+ // Reads a report the caller points at; merging blob reports spawns
85
+ // Playwright; records the run in the local history.
86
+ annotations: {
87
+ readOnlyHint: false,
88
+ destructiveHint: false,
89
+ idempotentHint: false,
90
+ openWorldHint: false,
91
+ },
92
+ handler: loadReportTool.handler,
93
+ },
79
94
  {
80
95
  ...suggestFixTool,
81
96
  title: 'Suggest (and apply) a fix',
@@ -134,6 +149,18 @@ const TOOLS = [
134
149
  },
135
150
  handler: auditAccessibilityTool.handler,
136
151
  },
152
+ {
153
+ ...auditPerformanceTool,
154
+ title: 'Audit page performance',
155
+ // Opens a page and reads performance entries; no state-changing actions
156
+ // beyond the caller's own `actions`.
157
+ annotations: {
158
+ readOnlyHint: true,
159
+ idempotentHint: true,
160
+ openWorldHint: true,
161
+ },
162
+ handler: auditPerformanceTool.handler,
163
+ },
137
164
  {
138
165
  ...generateE2ETestTool,
139
166
  title: 'Generate an E2E test',
@@ -192,14 +219,14 @@ const TOOLS = [
192
219
  export const READ_ONLY_TOOLS = ['list-tests', 'get-failure', 'analyze-history'];
193
220
  /**
194
221
  * Named tool sets for PW_MCP_TOOLS / --tools. Every tool definition costs
195
- * context on each request (all twelve are ~5.6k tokens), so a client that
222
+ * context on each request (all fourteen are ~9k tokens), so a client that
196
223
  * only fixes failing suites can load the core loop alone.
197
224
  */
198
225
  export const TOOL_PROFILES = {
199
226
  all: TOOLS.map((tool) => tool.name),
200
227
  core: ['run-test', 'get-run-status', 'get-failure', 'suggest-fix', 'diagnose-flaky', 'list-tests'],
201
- triage: ['run-test', 'get-run-status', 'get-failure', 'diagnose-flaky', 'analyze-history', 'list-tests'],
202
- inspect: ['inspect-page', 'validate-selector', 'compare-visual-state', 'audit-accessibility'],
228
+ triage: ['run-test', 'get-run-status', 'get-failure', 'load-report', 'diagnose-flaky', 'analyze-history', 'list-tests'],
229
+ inspect: ['inspect-page', 'validate-selector', 'compare-visual-state', 'audit-accessibility', 'audit-performance'],
203
230
  author: ['list-tests', 'inspect-page', 'validate-selector', 'generate-e2e-test', 'run-test'],
204
231
  };
205
232
  /**
@@ -1 +1 @@
1
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AAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE;QAC1C,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACvD,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,oBAAoB,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE;QAClC,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,yBAAyB,EAAE;QACxC,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;KAC9F,CAAC,CAAC;AACL,CAAC"}
@@ -2,15 +2,20 @@
2
2
  * Tool 10 — analyze-history: read the local run history and answer the
3
3
  * questions one red build cannot: which tests are flaky across runs, which
4
4
  * are simply broken, which failures share one cause, and how one test has
5
- * behaved over time.
5
+ * behaved over time; also which tests are slow or slowing down, how
6
+ * stability trends day by day, and the commit where each failing or
7
+ * flaky test went bad.
6
8
  */
7
9
  import { z } from 'zod';
8
10
  import type { ToolContext, ToolResponse } from '../types/index.js';
9
11
  declare const analyzeHistoryInput: z.ZodObject<{
10
12
  view: z.ZodOptional<z.ZodEnum<{
13
+ commits: "commits";
11
14
  flaky: "flaky";
12
15
  patterns: "patterns";
16
+ slow: "slow";
13
17
  test: "test";
18
+ trend: "trend";
14
19
  }>>;
15
20
  test: z.ZodOptional<z.ZodString>;
16
21
  lastRuns: z.ZodOptional<z.ZodNumber>;
@@ -20,9 +25,12 @@ declare const analyzeHistoryInput: z.ZodObject<{
20
25
  export type AnalyzeHistoryInput = z.infer<typeof analyzeHistoryInput>;
21
26
  export declare const analyzeHistorySchema: z.ZodObject<{
22
27
  view: z.ZodOptional<z.ZodEnum<{
28
+ commits: "commits";
23
29
  flaky: "flaky";
24
30
  patterns: "patterns";
31
+ slow: "slow";
25
32
  test: "test";
33
+ trend: "trend";
26
34
  }>>;
27
35
  test: z.ZodOptional<z.ZodString>;
28
36
  lastRuns: z.ZodOptional<z.ZodNumber>;
@@ -34,9 +42,12 @@ export declare const analyzeHistoryTool: {
34
42
  description: string;
35
43
  inputSchema: z.ZodObject<{
36
44
  view: z.ZodOptional<z.ZodEnum<{
45
+ commits: "commits";
37
46
  flaky: "flaky";
38
47
  patterns: "patterns";
48
+ slow: "slow";
39
49
  test: "test";
50
+ trend: "trend";
40
51
  }>>;
41
52
  test: z.ZodOptional<z.ZodString>;
42
53
  lastRuns: z.ZodOptional<z.ZodNumber>;