@qaily/playwright-html-reporter 0.0.0-stage → 1.0.1-beta.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 (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +144 -2
  3. package/app/assets/ai-labels-Cby68UqQ.js +1 -0
  4. package/app/assets/chronoscope-view-D2mpr002.js +5487 -0
  5. package/app/assets/classic-view--L85lT-b.js +124 -0
  6. package/app/assets/classic-view-BK8WPGfn.js +663 -0
  7. package/app/assets/classic-view-D-DsEujc.js +479 -0
  8. package/app/assets/classic-view-DNzHWzUJ.js +322 -0
  9. package/app/assets/classic-view-DY5E3Z4J.js +138 -0
  10. package/app/assets/classic-view-Ddd948Kp.js +169 -0
  11. package/app/assets/coverage-BPNr95uF.js +1 -0
  12. package/app/assets/duckdb-browser-eh.worker-hQa-dcAV.js +14 -0
  13. package/app/assets/duckdb-browser-mvp.worker-C9hF7LGh.js +14 -0
  14. package/app/assets/duckdb-eh-9ubY-jlA.wasm +4 -0
  15. package/app/assets/duckdb-goGSUA4o.js +4 -0
  16. package/app/assets/duckdb-mvp-BP0pRkMH.wasm +4 -0
  17. package/app/assets/index-8q_vTRNL.js +2 -0
  18. package/app/assets/index-CgoxrMDD.js +2 -0
  19. package/app/assets/index-D1EYpbL2.js +60 -0
  20. package/app/assets/index-DVTcbA8F.js +2 -0
  21. package/app/assets/index-DWXLfiLH.js +2 -0
  22. package/app/assets/index-Dp2n1TN3.js +983 -0
  23. package/app/assets/index-Dsdk0pht.js +6 -0
  24. package/app/assets/index-HYoRBkhX.js +2 -0
  25. package/app/assets/lanes-Bb9_UFmn.js +1 -0
  26. package/app/assets/monthly-view-eVyvfEs4.js +21 -0
  27. package/app/assets/mount-8XXBMtod.js +1 -0
  28. package/app/assets/period-CeHnAu7V.js +13 -0
  29. package/app/assets/runs-FAzljm9O.js +1 -0
  30. package/app/assets/settings-view-Bgsw3xiJ.js +544 -0
  31. package/app/assets/status-CSSAtLyf.js +1 -0
  32. package/app/assets/styles-CgnWMnm4.js +869 -0
  33. package/app/assets/weekly-view-i2vLZ_2D.js +22 -0
  34. package/app/index.html +17 -0
  35. package/dist/cli.mjs +6319 -0
  36. package/dist/index.cjs +160 -0
  37. package/dist/types/coverage-collector.d.ts +37 -0
  38. package/dist/types/coverage.d.ts +25 -0
  39. package/dist/types/index.d.ts +5 -0
  40. package/dist/types/reporter.d.ts +22 -0
  41. package/package.json +77 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Qaily
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,145 @@
1
- # Temporary Holding Version
1
+ # @qaily/playwright-html-reporter
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A Playwright reporter with a static, fast report built for test history: what failed today, how this week and
4
+ month went, which issues keep coming back, and which parts of the product the tests actually cover.
5
+
6
+ **[Live demo](https://qaily.github.io/qaily-playwright-html-reporter/)**, built from synthetic data.
7
+
8
+ - **Dashboards:** Monitoring (latest run per lane), Weekly, Monthly, Issues (failures grouped by cause), Tests
9
+ (every attempt with steps, errors, screenshots and traces) and a coverage Heat Map.
10
+ - **Static:** a single-page app on any static host, such as GitHub Pages. Data is pre-aggregated into small Parquet
11
+ and JSON files and queried in the browser with DuckDB-WASM, so months of runs load in seconds.
12
+ - **Large artifacts stay in your bucket:** traces, videos and screenshots are read straight from S3, Google Cloud
13
+ Storage or MinIO through short-lived signed links, so they never go into the site.
14
+ - **Optional AI:** analyse failures and suggest fixes through a local agent host (see [docs/ai.md](docs/ai.md)).
15
+ - **Themes:** Chronoscope (default, 3D dials and carousels), Classic (light and dark) and Dark Ops, switched in Settings.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ npm install --save-dev @qaily/playwright-html-reporter@beta
21
+ ```
22
+
23
+ Versions are still betas (`1.0.0-beta.N`), published under the `beta` tag; see [CHANGELOG.md](CHANGELOG.md).
24
+
25
+ Or straight from GitHub (builds on install, about 20 s): `npm install --save-dev github:qaily/qaily-playwright-html-reporter`.
26
+
27
+ Node 20 or newer. The reporter needs `@playwright/test`; step coverage labels need Playwright 1.58+.
28
+ The commands that talk to a bucket (`sync`, `pull`, `publish`, and `serve` when it signs links) use the
29
+ [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and its login.
30
+
31
+ ## 1. Record runs
32
+
33
+ ```ts
34
+ // playwright.config.ts
35
+ import { defineConfig } from '@playwright/test';
36
+
37
+ export default defineConfig({
38
+ reporter: [['@qaily/playwright-html-reporter', { outputDir: 'reports/data' }]],
39
+ });
40
+ ```
41
+
42
+ Each run becomes a folder under `outputDir`:
43
+
44
+ ```
45
+ reports/data/<ISO time>_<commit>_<n>/
46
+ manifest.jsonl.gz test-summary.jsonl.gz test_details.jsonl.gz errors.jsonl.gz attachments-index.jsonl.gz
47
+ step-coverage.jsonl.gz (only when steps are labelled)
48
+ attachments/ (screenshots, traces, logs)
49
+ ```
50
+
51
+ | Option | Default | Description |
52
+ |---|---|---|
53
+ | `outputDir` | `'./reports/data'` | Where run folders are written |
54
+ | `archived` | `true` | Write `.jsonl.gz` (true) or plain `.jsonl` (false) |
55
+ | `environment` | none | Environment name, e.g. `'staging'`; lanes can match it |
56
+ | `category` | none | What kind of run this is, e.g. `'ui:web'`; lanes can match it |
57
+ | `tag` | none | Suite name shown on the run, e.g. `'@regression'` |
58
+ | `coverage.levels` | `['Component', 'Test Name', 'Feature', 'Area']` | Step annotation types used as the heat map's four levels |
59
+ | `includeAttachmentChecksums` | `false` | SHA-256 of each attachment |
60
+ | `maxErrorMessageLength` | `500` | Error messages are cut at this length |
61
+ | `afterJsonl` | none | Called after the run's files are written |
62
+
63
+ Label steps for the coverage heat map (optional, see [docs/heatmap.md](docs/heatmap.md)):
64
+
65
+ ```ts
66
+ import { coverage } from '@qaily/playwright-html-reporter';
67
+
68
+ await test.step('Archive board', async (step) => {
69
+ coverage(step, { component: 'Permissions', scenario: 'Workspace owners', feature: 'Boards', area: 'Archive' });
70
+ // ...
71
+ });
72
+ ```
73
+
74
+ ## 2. Build and view the report
75
+
76
+ ```bash
77
+ npx qaily-report build --in reports/data --out report-data # rollups for the dashboards
78
+ npx qaily-report serve --data report-data --attachments reports/data
79
+ # → http://127.0.0.1:4173
80
+ ```
81
+
82
+ `build` only rebuilds months whose runs changed. Try it without tests: `npx qaily-report demo --out report-data`
83
+ writes 120 synthetic runs, with heat map rules and a planned matrix.
84
+
85
+ Everything else is set on the report's **Settings** page: lanes, health thresholds, theme, the bucket, heat map rules.
86
+ **Save for team** writes `report-data/settings.json` when the report is opened through `serve` (on GitHub Pages it
87
+ can commit the file instead, see [docs/ai.md](docs/ai.md#drafts-and-publishing)). A report that reads its data from a
88
+ bucket keeps team settings there instead, as `team-settings.json` next to the data (see
89
+ [docs/s3-artifacts.md](docs/s3-artifacts.md#team-settings-in-the-bucket)).
90
+
91
+ ## 3. Share it
92
+
93
+ Upload each run folder to a bucket from CI, with a `.sync-complete` marker last (the upload step is at the end of
94
+ [docs/report-site.example.yml](docs/report-site.example.yml)). Then build the report from the bucket:
95
+
96
+ ```bash
97
+ npx qaily-report sync --to runs --out report-data # run folders without attachments, then build
98
+ ```
99
+
100
+ The bucket comes from `report-data/settings.json` (Settings → For the team → Connections), or from flags:
101
+
102
+ ```json
103
+ { "connections": { "s3": { "bucket": "my-test-runs", "region": "eu-north-1", "prefix": "jsonl-report" } } }
104
+ ```
105
+
106
+ Copy `node_modules/@qaily/playwright-html-reporter/app` and your data folder (as `data/`) to any static host.
107
+ [docs/report-site.example.yml](docs/report-site.example.yml) does this on GitHub Pages every 30 minutes.
108
+
109
+ Dashboard data can live on the site (simplest) or in the bucket (private, viewers sign in with credentials). Both, and
110
+ the bucket, CORS and IAM setup for AWS, Google Cloud Storage and MinIO, are in [docs/s3-artifacts.md](docs/s3-artifacts.md).
111
+
112
+ ## `qaily-report` commands
113
+
114
+ | Command | What it does |
115
+ |---|---|
116
+ | `build --in <runs> --out <data> [--force] [--prune-before YYYY-MM]` | Turns run folders into the report's data, keeping runs whose folders have expired; `--force` rebuilds every month |
117
+ | `serve --data <data> [--attachments <runs>] [--aws-profile p] [--port 4173]` | Local server; signs bucket links with this machine's login |
118
+ | `sync --to <runs> --out <data> [--with-attachments]` | Downloads run folders from the bucket (attachments only if asked), then builds |
119
+ | `pull` / `publish --out <data> [--team-settings seed\|replace\|skip] [--allow-shrink]` | Bucket data source: fetch the last published data / upload the new one, and team settings when the bucket has none yet. See [expiring run folders](docs/s3-artifacts.md#when-run-folders-expire-too) |
120
+ | `expire-attachments --older-than <days> [--dry-run] [--all-versions]` | Deletes attachments of runs older than N days and keeps the rest of each run folder; run it daily. See [short retention](docs/s3-artifacts.md#8-short-retention-for-attachments) |
121
+ | `demo --out <data> [--runs 120] [--days 30]` | Synthetic runs, for trying the report |
122
+ | `catalog --csv <matrix.csv> --out <data>/coverage-catalog.json` | Planned coverage matrix for the heat map |
123
+
124
+ Bucket, region, key prefix and endpoint come from `<data>/settings.json`, or flags: `--bucket`, `--region`, `--prefix`,
125
+ `--endpoint` (Google Cloud Storage, MinIO), `--data-prefix`. `--aws-profile` picks the AWS CLI profile.
126
+
127
+ ## Develop
128
+
129
+ ```bash
130
+ npm ci
131
+ npm run data:demo # synthetic data in .qaily/data (git-ignored)
132
+ npm run app:dev # http://127.0.0.1:5173
133
+ npm run app:test && npm run app:typecheck
134
+ npm run pkg:build # dist/ and app/, as published to npm
135
+ ```
136
+
137
+ The workspace layout is described in [packages/README.md](packages/README.md).
138
+
139
+ ## Releasing
140
+
141
+ Actions → **Release** → Run workflow (bump and channel), as for `@qaily/playwright-jsonl-reporter`. See [docs/releasing.md](docs/releasing.md).
142
+
143
+ ## License
144
+
145
+ MIT
@@ -0,0 +1 @@
1
+ import{o as u,j as c}from"./index-Dp2n1TN3.js";const l=["var(--q-text)","var(--q-fail)","var(--q-pass)","var(--q-flaky)","var(--q-accent)","#c678dd","var(--q-accent)","var(--q-text)"];function f(n,i){let t={...n};for(let a=0;a<i.length;a++){const e=i[a];e===0?t={}:e===1?t.fontWeight="700":e===2?t.opacity="0.7":e===3?t.fontStyle="italic":e===4?t.textDecoration="underline":e===22?(delete t.fontWeight,delete t.opacity):e===39?delete t.color:e===49?delete t.background:e>=30&&e<=37?t.color=l[e-30]:e>=90&&e<=97?t.color=e===90?"var(--q-text-muted)":l[e-90]:e>=40&&e<=47?t.background=l[e-40]:(e===38||e===48)&&i[a+1]===5&&(a+=2)}return t}function v(n){return n.replace(/\u001b\[[0-9;]*m/g,"")}function p(n){if(!n)return[];const i=[],t=/\u001b\[([0-9;]*)m/g;let a={},e=0,o;const s=r=>{r&&i.push(Object.keys(a).length?c`<span style=${u({...a})}>${r}</span>`:c`${r}`)};for(;o=t.exec(n);)s(n.slice(e,o.index)),a=f(a,o[1]?o[1].split(";").map(Number):[0]),e=t.lastIndex;return s(n.slice(e)),i}const g={"product-bug":"Product bug","test-bug":"Test bug",environment:"Environment","test-data":"Test data",flaky:"Flaky",unknown:"Unclear"},m={"product-bug":"var(--q-fail)","test-bug":"var(--q-flaky)",environment:"var(--q-accent)","test-data":"var(--q-accent)",flaky:"var(--q-flaky)",unknown:"var(--q-skip)"};function y(n,i){const t=new Date(n.createdAt).toLocaleString(void 0,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",timeZone:i.display.timeZone==="UTC"?"UTC":void 0});return[n.model??n.provider,t,n.author?`by ${n.author}`:""].filter(Boolean).join(" · ")}export{g as A,y as a,p as b,m as c,v as s};