@andrii_kremlovskyi/playwright-traces-reader 2.5.3 → 2.6.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.
- package/README.md +3 -3
- package/dist/cli/formatters.d.ts +3 -4
- package/dist/cli/formatters.d.ts.map +1 -1
- package/dist/cli/formatters.js +13 -48
- package/dist/cli/formatters.js.map +1 -1
- package/dist/cli/helpers.d.ts +0 -1
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/helpers.js +0 -2
- package/dist/cli/helpers.js.map +1 -1
- package/dist/cli/json.d.ts +90 -10
- package/dist/cli/json.d.ts.map +1 -1
- package/dist/cli/json.js +3 -2
- package/dist/cli/json.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -35
- package/dist/cli.js.map +1 -1
- package/dist/extractors.d.ts +32 -30
- package/dist/extractors.d.ts.map +1 -1
- package/dist/extractors.js +215 -175
- package/dist/extractors.js.map +1 -1
- package/dist/failureDigest.d.ts +17 -0
- package/dist/failureDigest.d.ts.map +1 -0
- package/dist/failureDigest.js +310 -0
- package/dist/failureDigest.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/parseTrace.d.ts +4 -1
- package/dist/parseTrace.d.ts.map +1 -1
- package/dist/parseTrace.js +7 -3
- package/dist/parseTrace.js.map +1 -1
- package/package.json +1 -1
- package/templates/skills/analyze-playwright-traces/SKILL.md +45 -26
package/dist/parseTrace.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseTrace.d.ts","sourceRoot":"","sources":["../src/parseTrace.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAA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/E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsBzF;AAID,uEAAuE;AACvE,MAAM,WAAW,eAAe;IAC9B,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,sFAAsF;IACtF,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,eAAe,CAqB1E;AAID,qDAAqD;AACrD,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC,CAwCvB"}
|
package/dist/parseTrace.js
CHANGED
|
@@ -177,30 +177,34 @@ async function getReportMetadata(reportDir) {
|
|
|
177
177
|
* Builds SHA1-keyed lookup maps from parsed report metadata.
|
|
178
178
|
*
|
|
179
179
|
* Iterates over all test results and their trace attachments to create
|
|
180
|
-
*
|
|
180
|
+
* three maps:
|
|
181
181
|
* - `outcomeByTraceSha1` — maps a trace's SHA1 to the test's outcome
|
|
182
182
|
* - `testIdByTraceSha1` — maps a trace's SHA1 to the test's unique ID
|
|
183
|
+
* - `retryByTraceSha1` — maps a trace's SHA1 to its retry index (result order)
|
|
183
184
|
*
|
|
184
185
|
* @param meta Parsed report metadata from `getReportMetadata()`.
|
|
185
186
|
*/
|
|
186
187
|
function buildReportTraceMaps(meta) {
|
|
187
188
|
const outcomeByTraceSha1 = new Map();
|
|
188
189
|
const testIdByTraceSha1 = new Map();
|
|
190
|
+
const retryByTraceSha1 = new Map();
|
|
189
191
|
for (const file of meta.files) {
|
|
190
192
|
for (const t of file.tests) {
|
|
191
|
-
for (
|
|
193
|
+
for (let resultIndex = 0; resultIndex < t.results.length; resultIndex++) {
|
|
194
|
+
const result = t.results[resultIndex];
|
|
192
195
|
for (const att of result.attachments) {
|
|
193
196
|
if (att.name === 'trace' && att.path) {
|
|
194
197
|
// att.path is like "data/<sha1>.zip"
|
|
195
198
|
const sha1 = path.basename(att.path, '.zip');
|
|
196
199
|
outcomeByTraceSha1.set(sha1, t.outcome);
|
|
197
200
|
testIdByTraceSha1.set(sha1, t.testId);
|
|
201
|
+
retryByTraceSha1.set(sha1, resultIndex);
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
|
-
return { outcomeByTraceSha1, testIdByTraceSha1 };
|
|
207
|
+
return { outcomeByTraceSha1, testIdByTraceSha1, retryByTraceSha1 };
|
|
204
208
|
}
|
|
205
209
|
/**
|
|
206
210
|
* Searches a Playwright HTML report for tests matching a name pattern and
|
package/dist/parseTrace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseTrace.js","sourceRoot":"","sources":["../src/parseTrace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAa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AC;AAED,KAAK,UAAU,cAAc,CAAC,SAAiB;IAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,6CAA6C;IAC7C,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC7D,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analyze-playwright-traces
|
|
3
|
-
description: Analyze Playwright reports and traces using the playwright-traces-reader CLI, including searching a local playwright-reports hub for runs like
|
|
3
|
+
description: Analyze Playwright reports and traces using the playwright-traces-reader CLI, including searching a local playwright-reports hub for runs like UAT EU before inspecting failures, single-test summaries, network traffic, DOM snapshots, screenshots, and timelines.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Analyze Playwright Traces
|
|
@@ -19,9 +19,9 @@ Use this skill when the user asks to analyze Playwright reports or traces, inclu
|
|
|
19
19
|
|
|
20
20
|
## Output Handling
|
|
21
21
|
|
|
22
|
-
- Do not truncate `npx playwright-traces-reader failures ...` output on the first attempt with `Select-Object`, `head`, or similar shell filtering.
|
|
23
|
-
- `failures`
|
|
24
|
-
- After reading
|
|
22
|
+
- Do not truncate `npx playwright-traces-reader failures ...` manifest output on the first attempt with `Select-Object`, `head`, or similar shell filtering.
|
|
23
|
+
- `failures` prints a compact manifest and writes per-failure folders to disk; consume the manifest in full, then read individual failure folders as needed.
|
|
24
|
+
- After reading the manifest, open a failure folder's `failure.json` (and its companion files) directly; use `summary <tracePath>` only for extra detail.
|
|
25
25
|
- For potentially larger commands such as `network`, `dom`, or `timeline`, narrowing output is acceptable when needed.
|
|
26
26
|
|
|
27
27
|
## Prerequisites
|
|
@@ -61,13 +61,13 @@ Important scope rule:
|
|
|
61
61
|
If the user gave no report identifier at all, do not start with hub discovery. Use the local default `playwright-report/` directory first.
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx playwright-traces-reader failures playwright-report/
|
|
64
|
+
npx playwright-traces-reader failures playwright-report/ ./trace-analysis
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Use `search-reports` when the user describes a report by metadata or recency instead of giving a filesystem path.
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
npx playwright-traces-reader search-reports "UAT EU" --
|
|
70
|
+
npx playwright-traces-reader search-reports "UAT EU" --limit 1
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
This returns report references plus local report paths when available.
|
|
@@ -75,7 +75,6 @@ This returns report references plus local report paths when available.
|
|
|
75
75
|
Discovery flag meanings:
|
|
76
76
|
|
|
77
77
|
- `--base-url <url>` points to the local `playwright-reports` hub. Default: `http://127.0.0.1:9333`.
|
|
78
|
-
- `--latest` asks the hub for the newest matching report.
|
|
79
78
|
- `--limit <count>` limits how many matching reports are returned.
|
|
80
79
|
- `--range-start <YYYY-MM-DD>` filters reports created on or after that date.
|
|
81
80
|
- `--range-end <YYYY-MM-DD>` filters reports created on or before that date.
|
|
@@ -88,7 +87,7 @@ If the hub is unreachable, `search-reports` and `prepare-report` fail with a dir
|
|
|
88
87
|
Useful examples:
|
|
89
88
|
|
|
90
89
|
```bash
|
|
91
|
-
npx playwright-traces-reader search-reports "UAT EU" --
|
|
90
|
+
npx playwright-traces-reader search-reports "UAT EU" --limit 1
|
|
92
91
|
npx playwright-traces-reader search-reports "UAT EU" --range-start 2026-04-01 --range-end 2026-04-03
|
|
93
92
|
npx playwright-traces-reader search-reports "checkout" --selected-dates 2026-04-02,2026-04-03
|
|
94
93
|
npx playwright-traces-reader search-reports "smoke" --base-url http://127.0.0.1:9333
|
|
@@ -107,9 +106,9 @@ Use `prepare-report` when the question changes from "which report matches?" to "
|
|
|
107
106
|
Example handoff flow:
|
|
108
107
|
|
|
109
108
|
```bash
|
|
110
|
-
npx playwright-traces-reader search-reports "UAT EU" --
|
|
109
|
+
npx playwright-traces-reader search-reports "UAT EU" --limit 1
|
|
111
110
|
npx playwright-traces-reader prepare-report <reportRef>
|
|
112
|
-
npx playwright-traces-reader failures <reportRootPath>
|
|
111
|
+
npx playwright-traces-reader failures <reportRootPath> ./trace-analysis
|
|
113
112
|
npx playwright-traces-reader summary <tracePath>
|
|
114
113
|
```
|
|
115
114
|
|
|
@@ -136,7 +135,7 @@ Text format outputs the raw markdown content directly. JSON format wraps it in a
|
|
|
136
135
|
Typical flow: discover a report, then read its analysis file if one exists.
|
|
137
136
|
|
|
138
137
|
```bash
|
|
139
|
-
npx playwright-traces-reader search-reports "UAT EU" --
|
|
138
|
+
npx playwright-traces-reader search-reports "UAT EU" --limit 1
|
|
140
139
|
# → check analysisFile field in the response
|
|
141
140
|
npx playwright-traces-reader vault-read <analysisFile>
|
|
142
141
|
```
|
|
@@ -151,26 +150,35 @@ The agent cannot access vault files directly with `read_file` because they are s
|
|
|
151
150
|
|
|
152
151
|
### Report-level analysis
|
|
153
152
|
|
|
154
|
-
Use `failures` when the user wants all
|
|
153
|
+
Use `failures` when the user wants to triage all failing tests in a report. It
|
|
154
|
+
**requires an output directory** and writes one self-contained folder per failed
|
|
155
|
+
attempt (including each failed retry) into a timestamped run subfolder, then
|
|
156
|
+
prints a compact manifest.
|
|
155
157
|
|
|
156
158
|
```bash
|
|
157
|
-
npx playwright-traces-reader failures /path/to/playwright-report
|
|
159
|
+
npx playwright-traces-reader failures /path/to/playwright-report /path/to/output
|
|
158
160
|
```
|
|
159
161
|
|
|
160
162
|
Use `--exclude-skipped` to omit skipped tests:
|
|
161
163
|
|
|
162
164
|
```bash
|
|
163
|
-
npx playwright-traces-reader failures /path/to/playwright-report/data --exclude-skipped
|
|
165
|
+
npx playwright-traces-reader failures /path/to/playwright-report/data /path/to/output --exclude-skipped
|
|
164
166
|
```
|
|
165
167
|
|
|
166
|
-
What it
|
|
168
|
+
What it does:
|
|
169
|
+
|
|
170
|
+
- creates `<output>/run-<timestamp>/` and writes one folder per failed attempt
|
|
171
|
+
- each folder contains `failure.json` (the full digest), `screenshots/` frames
|
|
172
|
+
around each failure point, `network-errors.json`, `console-errors.json`,
|
|
173
|
+
and `error.md` when available
|
|
174
|
+
- mirrors the manifest to `<runDir>/index.json`
|
|
175
|
+
- prints the compact manifest to stdout (one entry per failed attempt with
|
|
176
|
+
`folder`, `retryIndex`, counts)
|
|
167
177
|
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- repeated failing-request and repeated correlated-issue patterns across unique non-skipped failures
|
|
173
|
-
- enough information to follow up with `summary <tracePath>` for one selected failure
|
|
178
|
+
Read the per-failure folder directly from disk instead of re-querying the trace —
|
|
179
|
+
that is the whole point: everything needed to reason about one failure is bundled
|
|
180
|
+
in its folder. Use `summary <tracePath>` only when you need additional detail not
|
|
181
|
+
in the folder.
|
|
174
182
|
|
|
175
183
|
### Finding traces for any test
|
|
176
184
|
|
|
@@ -223,8 +231,7 @@ Important behavior:
|
|
|
223
231
|
- `summary` works for both passed and failed traces
|
|
224
232
|
- `summary` includes issues and aggregated related-action diagnostics
|
|
225
233
|
- failed traces include `failureDomSnapshot` — a lightweight metadata reference (callId, phases, frameUrl), NOT the full HTML
|
|
226
|
-
- to retrieve full DOM HTML, use `dom --near <callId> --output
|
|
227
|
-
- to retrieve full DOM HTML, use `dom --near <callId> --output <path>`
|
|
234
|
+
- to retrieve full DOM HTML, use `dom --near <callId> --output ./tmp/dom.json`
|
|
228
235
|
- passed traces return `status: "passed"` and `failureDomSnapshot: null`
|
|
229
236
|
|
|
230
237
|
### Slow steps
|
|
@@ -305,14 +312,26 @@ npx playwright-traces-reader errors /path/to/playwright-report/data/<sha1>
|
|
|
305
312
|
Output is always written to a file (`--output` is required).
|
|
306
313
|
|
|
307
314
|
```bash
|
|
308
|
-
npx playwright-traces-reader dom /path/to/playwright-report/data/<sha1> --output
|
|
315
|
+
npx playwright-traces-reader dom /path/to/playwright-report/data/<sha1> --output ./tmp/dom.json --near last --limit 3
|
|
309
316
|
```
|
|
310
317
|
|
|
318
|
+
Write to a path **inside the workspace** (e.g. `./tmp/dom.json`) so you can open
|
|
319
|
+
it afterward with `read_file`. The DOM HTML is the point of this command — saving
|
|
320
|
+
to `/tmp` outside the workspace makes it harder to read back.
|
|
321
|
+
|
|
322
|
+
There is no separate `.html` file. The HTML is stored as a string in the
|
|
323
|
+
`snapshots[].<phase>.html` field (where `<phase>` is `before`, `action`, or
|
|
324
|
+
`after`) inside the JSON file. Open the JSON with `read_file` and read that field.
|
|
325
|
+
|
|
326
|
+
Each snapshot's `html` is self-contained: child `<iframe>`/`<frame>` content is
|
|
327
|
+
inlined recursively as `srcdoc` (no `/snapshot/<frameId>` placeholders), so you
|
|
328
|
+
can read embedded vendor/app flows and update locators directly. Targets inside
|
|
329
|
+
child frames are resolved into `targetElement`.
|
|
330
|
+
|
|
311
331
|
Useful filters:
|
|
312
332
|
|
|
313
333
|
- `--near last`
|
|
314
334
|
- `--near <callId>` (use the callId from `failureDomSnapshot` in the summary)
|
|
315
|
-
- `--near <callId>` (use the callId from `failureDomSnapshot` in the summary)
|
|
316
335
|
- `--phase before|action|after`
|
|
317
336
|
- `--limit <count>`
|
|
318
337
|
|
|
@@ -383,7 +402,7 @@ npx playwright-traces-reader init-skills
|
|
|
383
402
|
## Example Prompts This Skill Covers
|
|
384
403
|
|
|
385
404
|
- Analyze the default local Playwright report and list failures.
|
|
386
|
-
- Find the
|
|
405
|
+
- Find the UAT EU report and list failing tests.
|
|
387
406
|
- Find checkout reports from `2026-04-01` through `2026-04-03` and prepare the newest one.
|
|
388
407
|
- Resolve this `reportRef` and summarize the failing trace.
|
|
389
408
|
- Use the reports hub at `http://127.0.0.1:9333` to find the most recent smoke run.
|