@sentinelqa/playwright-reporter 0.1.51 → 0.1.54
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 +112 -107
- package/dist/localReport.js +360 -32
- package/dist/quickDiagnosis.d.ts +42 -2
- package/dist/quickDiagnosis.js +1587 -89
- package/dist/reporter.js +160 -31
- package/dist/runHistory.d.ts +3 -0
- package/dist/runHistory.js +11 -1
- package/dist/terminalSummary.js +115 -27
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
# Playwright Reporter
|
|
2
2
|
|
|
3
|
-
After every failed run,
|
|
3
|
+
After every failed Playwright run, Sentinel gives you:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- a clear CLI diagnosis
|
|
6
|
+
- a shareable debugging link
|
|
7
|
+
- grouped failures by likely root cause
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Sample run: https://app.sentinelqa.com/share/1f343d91-be17-4c14-b1b9-2d4e8ef448d2
|
|
8
10
|
|
|
9
11
|
[](https://www.npmjs.com/package/@sentinelqa/playwright-reporter)
|
|
10
12
|
[](https://www.npmjs.com/package/@sentinelqa/playwright-reporter)
|
|
11
13
|
[](./LICENSE)
|
|
12
14
|
|
|
13
|
-
From failed CI run
|
|
14
|
-
Get a shareable Playwright debugging link with traces, screenshots, and failure context — no setup required.
|
|
15
|
-
|
|
16
|
-
Works with no account or API key required.
|
|
15
|
+
From failed CI run to root cause in seconds.
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Works with no account and no API key.
|
|
19
18
|
|
|
20
19
|

|
|
21
|
-

|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## What It Does
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
- Public run page that opens on unified failures across the run
|
|
27
|
-
- Within-run failure grouping so repeated failures collapse into one issue
|
|
28
|
-
- Public failure pages with screenshots, evidence, parsed errors and light summaries
|
|
29
|
-
- Copyable share actions for Slack, PRs, and debugging handoff
|
|
30
|
-
- Deterministic quick diagnosis in the terminal after failed runs
|
|
31
|
-
- Playwright traces, screenshots, videos and logs uploaded automatically
|
|
32
|
-
- 48-hour public share links on the free hosted flow
|
|
33
|
-
- Works with existing Playwright reporter setup
|
|
34
|
-
- Optional live failure capture for richer Sentinel Cloud analysis
|
|
35
|
-
- CI run history, retention, and deeper AI debugging in Sentinel Cloud
|
|
24
|
+
Sentinel explains Playwright failures locally, groups them into real root causes, and gives you a shareable link to inspect the run.
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
The open-source reporter is focused on one job:
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
- tell you what broke
|
|
29
|
+
- show why it failed
|
|
30
|
+
- point to the likely root cause
|
|
31
|
+
- tell you what to check next
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- Free hosted debugging links by default
|
|
36
|
+
- Deterministic CLI diagnosis after failed runs
|
|
37
|
+
- Failure grouping by likely root cause
|
|
38
|
+
- Shared run page with traces, screenshots, videos, and logs
|
|
39
|
+
- Failure pages that explain what broke, why, where, and what to do next
|
|
40
|
+
- Better timeout, actionability, assertion, navigation, and backend failure wording
|
|
41
|
+
- Public share links that are easy to paste into Slack, PRs, and issues
|
|
42
|
+
- Works with existing Playwright reporter setup
|
|
42
43
|
|
|
43
|
-
## Why
|
|
44
|
+
## Why Teams Use It
|
|
44
45
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
46
|
+
- You do not need to open raw logs first
|
|
47
|
+
- Repeated failures collapse into a smaller number of real issues
|
|
48
|
+
- The CLI explains the failure immediately in CI
|
|
49
|
+
- Anyone on the team can open the same shared debugging link
|
|
50
|
+
- The hosted report keeps the explanation, artifacts, and grouped failures in one place
|
|
50
51
|
|
|
51
52
|
## Requirements
|
|
52
53
|
|
|
@@ -55,14 +56,6 @@ Reporter uploads those artifacts into a single hosted Sentinel run page so you c
|
|
|
55
56
|
|
|
56
57
|
## Quick Start
|
|
57
58
|
|
|
58
|
-
`withSentinel()` is the default setup for everyone:
|
|
59
|
-
|
|
60
|
-
- best for free and local users
|
|
61
|
-
- zero-friction setup
|
|
62
|
-
- hosted Sentinel report link is generated automatically
|
|
63
|
-
- no `SENTINEL_TOKEN` required
|
|
64
|
-
- AI summaries use trace and reporter evidence, but are less precise than live page capture
|
|
65
|
-
|
|
66
59
|
Install:
|
|
67
60
|
|
|
68
61
|
```bash
|
|
@@ -91,80 +84,91 @@ export default withSentinel(
|
|
|
91
84
|
);
|
|
92
85
|
```
|
|
93
86
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Run your Playwright tests:
|
|
87
|
+
Run your tests:
|
|
97
88
|
|
|
98
89
|
```bash
|
|
99
90
|
npx playwright test
|
|
100
91
|
```
|
|
101
92
|
|
|
102
|
-
If tests fail, Sentinel uploads
|
|
93
|
+
If tests fail, Sentinel uploads the run and prints a shareable link in the terminal.
|
|
103
94
|
|
|
104
|
-
|
|
95
|
+
## CLI Output
|
|
105
96
|
|
|
106
|
-
|
|
107
|
-
- within-run grouped failures
|
|
108
|
-
- screenshots and videos
|
|
109
|
-
- trace links
|
|
110
|
-
- parsed failure details
|
|
111
|
-
- light summaries
|
|
112
|
-
- shareable public debugging page
|
|
97
|
+
On failed runs, Sentinel prints a compact diagnosis that answers:
|
|
113
98
|
|
|
114
|
-
|
|
99
|
+
1. What failed?
|
|
100
|
+
2. What caused it?
|
|
101
|
+
3. Where is it?
|
|
102
|
+
4. What should I check next?
|
|
115
103
|
|
|
116
|
-
|
|
117
|
-
- public read-only pages
|
|
118
|
-
- fast enough to use in CI comments and Slack threads
|
|
119
|
-
- clear upgrade path into a full Sentinel workspace when teams want history, retention, and deeper analysis
|
|
104
|
+
Typical output:
|
|
120
105
|
|
|
121
|
-
|
|
106
|
+
```text
|
|
107
|
+
Sentinel diagnosis
|
|
108
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
122
109
|
|
|
123
|
-
|
|
110
|
+
RECURRING FAILURE (12 previous runs)
|
|
124
111
|
|
|
125
|
-
|
|
112
|
+
❌ 4 failures (grouped)
|
|
113
|
+
Collapsed into 2 real issues
|
|
126
114
|
|
|
127
|
-
|
|
115
|
+
Issue 1: Blocked click on getByRole('button', { name: 'Save' }) (3 tests)
|
|
116
|
+
Cause: .modal-backdrop intercepted pointer events before the click completed
|
|
117
|
+
Where: checkout.spec.ts:22; billing.spec.ts:41
|
|
118
|
+
Failing step: Click on getByRole('button', { name: 'Save' }) selector
|
|
119
|
+
Blocker: .modal-backdrop intercepting pointer events
|
|
120
|
+
Likely fix: dismiss or wait for .modal-backdrop to disappear before clicking Save
|
|
121
|
+
Impact: 3 tests failing with same root cause
|
|
128
122
|
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
123
|
+
Issue 2: Assertion mismatch (getByTestId('metric-pass-rate')) (1 test)
|
|
124
|
+
Cause: getByTestId('metric-pass-rate') showed "88%" instead of "100%"
|
|
125
|
+
Where: app.spec.ts:68
|
|
126
|
+
Failing step: Expect text on getByTestId('metric-pass-rate') selector
|
|
127
|
+
Expected: 100%
|
|
128
|
+
Received: 88%
|
|
129
|
+
Likely fix: fix the UI state or data behind getByTestId('metric-pass-rate') so it shows "100%"
|
|
130
|
+
Impact: 1 test failing with this root cause
|
|
131
|
+
```
|
|
135
132
|
|
|
136
|
-
|
|
133
|
+
On passed runs, Sentinel stays quiet unless there is a strong risk signal worth surfacing.
|
|
137
134
|
|
|
138
|
-
|
|
135
|
+
## What The Shared Report Shows
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
SENTINEL_TOKEN=your_project_ingest_token npx playwright test
|
|
142
|
-
```
|
|
137
|
+
The hosted report is simple on purpose.
|
|
143
138
|
|
|
144
|
-
|
|
139
|
+
It focuses on:
|
|
145
140
|
|
|
146
|
-
|
|
141
|
+
- grouped failures
|
|
142
|
+
- explanation of why each issue failed
|
|
143
|
+
- affected tests
|
|
144
|
+
- artifacts
|
|
145
|
+
- recent history
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
- Injects a Playwright JSON reporter if one is missing
|
|
150
|
-
- Sets sensible artifact defaults:
|
|
151
|
-
- trace: `retain-on-failure`
|
|
152
|
-
- screenshot: `only-on-failure`
|
|
153
|
-
- video: `retain-on-failure`
|
|
154
|
-
- Uploads the run to hosted Sentinel at the end of the test run
|
|
147
|
+
Open the link to inspect:
|
|
155
148
|
|
|
156
|
-
|
|
149
|
+
- failures grouped by likely root cause
|
|
150
|
+
- whether multiple failures appear related
|
|
151
|
+
- the best available explanation for each issue
|
|
152
|
+
- screenshots, traces, videos, and logs
|
|
153
|
+
- direct links you can share with the rest of the team
|
|
157
154
|
|
|
158
|
-
|
|
155
|
+
## Free Hosted Mode
|
|
159
156
|
|
|
160
|
-
|
|
157
|
+
If `SENTINEL_TOKEN` is not set, the reporter uploads the run to a free hosted Sentinel report and prints the public share URL.
|
|
161
158
|
|
|
162
|
-
|
|
163
|
-
- a Playwright reporter does not get the live `page` fixture
|
|
164
|
-
- the live capture fixture lets Sentinel collect richer DOM and code context at the exact failure moment
|
|
165
|
-
- this is required for the highest-quality DOM-aware patches
|
|
159
|
+
This free flow includes:
|
|
166
160
|
|
|
167
|
-
|
|
161
|
+
- CLI diagnosis
|
|
162
|
+
- hosted run page
|
|
163
|
+
- grouped failures
|
|
164
|
+
- failure explanation
|
|
165
|
+
- public share links
|
|
166
|
+
|
|
167
|
+
## Optional Richer Capture
|
|
168
|
+
|
|
169
|
+
`withSentinel()` works on its own and is the simplest setup.
|
|
170
|
+
|
|
171
|
+
If you want richer failure evidence, you can also attach the failure capture fixture:
|
|
168
172
|
|
|
169
173
|
```ts
|
|
170
174
|
// tests/test.ts
|
|
@@ -175,20 +179,28 @@ export const test = attachSentinelFailureCapture(base);
|
|
|
175
179
|
export { expect };
|
|
176
180
|
```
|
|
177
181
|
|
|
178
|
-
Then import from that file in your specs
|
|
182
|
+
Then import from that file in your specs:
|
|
179
183
|
|
|
180
184
|
```ts
|
|
181
185
|
import { test, expect } from "./test";
|
|
182
186
|
```
|
|
183
187
|
|
|
184
|
-
|
|
188
|
+
This improves the quality of:
|
|
189
|
+
|
|
190
|
+
- blocked action diagnosis
|
|
191
|
+
- assertion mismatch diagnosis
|
|
192
|
+
- timeout explanations
|
|
193
|
+
- DOM and state evidence in the report
|
|
185
194
|
|
|
186
|
-
|
|
187
|
-
- best fix suggestions
|
|
188
|
-
- richer DOM-aware diagnosis
|
|
189
|
-
- more reliable code patches grounded in real page state
|
|
195
|
+
## What `withSentinel()` Does
|
|
190
196
|
|
|
191
|
-
|
|
197
|
+
- Preserves your existing reporter configuration
|
|
198
|
+
- Injects a Playwright JSON reporter if one is missing
|
|
199
|
+
- Sets sensible artifact defaults:
|
|
200
|
+
- trace: `retain-on-failure`
|
|
201
|
+
- screenshot: `only-on-failure`
|
|
202
|
+
- video: `retain-on-failure`
|
|
203
|
+
- Uploads the run to Sentinel at the end of the test run
|
|
192
204
|
|
|
193
205
|
## Options
|
|
194
206
|
|
|
@@ -203,19 +215,12 @@ withSentinel(config, {
|
|
|
203
215
|
});
|
|
204
216
|
```
|
|
205
217
|
|
|
206
|
-
##
|
|
218
|
+
## Workspace
|
|
207
219
|
|
|
208
|
-
Sentinel
|
|
220
|
+
If you want private run history, recurring issue tracking, and team access, sign up for a Sentinel workspace and set `SENTINEL_TOKEN`.
|
|
209
221
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- flaky test detection
|
|
214
|
-
- shareable run links
|
|
215
|
-
- longer retention
|
|
216
|
-
- compare against previous runs
|
|
217
|
-
- recurring failure history
|
|
218
|
-
- richer fix suggestions and team workflows
|
|
222
|
+
```bash
|
|
223
|
+
SENTINEL_TOKEN=your_project_ingest_token npx playwright test
|
|
224
|
+
```
|
|
219
225
|
|
|
220
|
-
|
|
221
|
-
Create an account at [sentinelqa.com](https://sentinelqa.com).
|
|
226
|
+
Create a workspace at [sentinelqa.com/register](https://sentinelqa.com/register).
|