@andrii_kremlovskyi/playwright-traces-reader 2.6.1 → 2.6.2

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 (2) hide show
  1. package/README.md +16 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,6 +10,7 @@ See [CLI_JSON_CONTRACTS.md](docs/CLI_JSON_CONTRACTS.md) for the versioned JSON o
10
10
 
11
11
  - Search a local `playwright-reports` hub for reports by metadata, date, and recency before parsing (`search-reports`, `prepare-report`)
12
12
  - Read vault analysis markdown files from the hub when reports have associated analysis notes (`vault-read`)
13
+ - Digest every failing attempt in a report into one self-contained folder on disk — `failure.json`, extracted screenshots, network/console errors, and a cleaned `error.md` — plus an `index.json` manifest (`failures` CLI command)
13
14
  - Find all unique failed tests across a report in one call — retries deduplicated, passing tests excluded, last retry selected automatically (`getFailedTestSummaries`)
14
15
  - One-call failure summary: title, error, step tree, slowest steps, API calls, issues, related-action diagnostics, and DOM snapshot at failure (`getSummary`)
15
16
  - Extract test steps with timings and errors (`getTestSteps`, `getTopLevelFailures`)
@@ -39,7 +40,7 @@ The package exposes a local CLI. In a repository that has the package installed,
39
40
  ```bash
40
41
  npx playwright-traces-reader search-reports "UAT EU" --limit 1
41
42
  npx playwright-traces-reader prepare-report <reportRef>
42
- npx playwright-traces-reader failures ./playwright-report
43
+ npx playwright-traces-reader failures ./playwright-report ./trace-analysis
43
44
  npx playwright-traces-reader find-traces ./playwright-report "test name"
44
45
  npx playwright-traces-reader summary ./playwright-report/data/<sha1>
45
46
  npx playwright-traces-reader network ./playwright-report/data/<sha1>
@@ -52,7 +53,7 @@ Phase 1 commands:
52
53
  - `prepare-report <reportRef>` — resolve a searched report into local analysis-ready paths
53
54
  - `vault-read <filename>` — read a vault analysis markdown file from the hub (supports `--out` to save to a local file)
54
55
  - `init-skills [targetDir]` — scaffold the GitHub Copilot skill into a repository
55
- - `failures <reportPath>` — report-level unique failing test analysis
56
+ - `failures <reportPath> <outputDir>` — digest failing attempts into self-contained folders on disk
56
57
  - `find-traces <reportPath> <grep>` — find trace paths for tests matching a name pattern
57
58
  - `summary <tracePath>` — one-call trace summary
58
59
  - `slow-steps <tracePath>` — slowest steps from a single trace
@@ -86,14 +87,22 @@ Hub-assisted discovery details:
86
87
  - Override with `--base-url <url>` or `PLAYWRIGHT_REPORTS_BASE_URL`
87
88
  - If no report is specified by path, `reportRef`, metadata, date, or recency hint, the default local analysis target should be `./playwright-report`
88
89
 
89
- `failures` is a compact triage command. It returns per-failure trace pointers plus primary related-action context and repeated cross-report request or issue patterns, so the next step is usually to run `summary <tracePath>` for one selected failure.
90
+ `failures` is the primary triage command. It requires an `<outputDir>` and writes one
91
+ self-contained folder per failed attempt (each failed retry included, no dedup) under
92
+ `<outputDir>/run-<timestamp>/`. Each folder holds `failure.json` (title, error, step
93
+ tree, slowest steps, API calls, issues, related-action diagnostics, and a DOM-snapshot
94
+ reference at failure), already-extracted screenshots, `network-errors.json`,
95
+ `console-errors.json`, and `error.md` (Playwright's human-readable error with its generic
96
+ `# Instructions` preamble stripped, diagnostic sections kept verbatim) when available. A
97
+ manifest is printed to stdout and mirrored to `<runDir>/index.json`. Read a failure folder
98
+ directly; run `summary <tracePath>` only when you need extra detail for one selected failure.
90
99
 
91
100
  `find-traces` is a discovery command for locating any test's trace — including passed tests. It matches a regex against full test titles and returns trace paths for all retries, with optional `--outcome` filtering.
92
101
 
93
102
  Typical CLI workflow:
94
103
 
95
104
  ```bash
96
- npx playwright-traces-reader failures ./playwright-report
105
+ npx playwright-traces-reader failures ./playwright-report ./trace-analysis
97
106
  npx playwright-traces-reader summary /absolute/path/to/playwright-report/data/<sha1>
98
107
  ```
99
108
 
@@ -109,7 +118,7 @@ Hub-assisted workflow:
109
118
  ```bash
110
119
  npx playwright-traces-reader search-reports "UAT EU" --limit 1
111
120
  npx playwright-traces-reader prepare-report <reportRef>
112
- npx playwright-traces-reader failures <reportRootPath>
121
+ npx playwright-traces-reader failures <reportRootPath> <outputDir>
113
122
  npx playwright-traces-reader summary <tracePath>
114
123
  npx playwright-traces-reader vault-read <analysisFile>
115
124
  ```
@@ -234,8 +243,8 @@ The API section below describes the exported library functions.
234
243
 
235
244
  Important distinction:
236
245
 
237
- - the CLI `failures` command now returns compact triage records
238
- - the library `getFailedTestSummaries()` function still returns full `TraceSummary[]`
246
+ - the CLI `failures` command digests failing attempts into self-contained folders on disk
247
+ - the library `getFailedTestSummaries()` function returns full `TraceSummary[]` in memory
239
248
 
240
249
  ### `getFailedTestSummaries(reportDataDir, options?)`
241
250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrii_kremlovskyi/playwright-traces-reader",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Parse Playwright trace files into structured data for AI agents and tooling",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",