@sentinelqa/playwright-reporter 0.1.53 → 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 CHANGED
@@ -1,92 +1,53 @@
1
1
  # Playwright Reporter
2
2
 
3
- After every failed run, reporter prints a shareable debugging link:
3
+ After every failed Playwright run, Sentinel gives you:
4
4
 
5
- Sample run: https://app.sentinelqa.com/share/1f343d91-be17-4c14-b1b9-2d4e8ef448d2
5
+ - a clear CLI diagnosis
6
+ - a shareable debugging link
7
+ - grouped failures by likely root cause
6
8
 
7
- Open it to inspect failures instantly or share it in Slack, PRs, or GitHub issues.
9
+ Sample run: https://app.sentinelqa.com/share/1f343d91-be17-4c14-b1b9-2d4e8ef448d2
8
10
 
9
11
  [![npm](https://img.shields.io/npm/v/@sentinelqa/playwright-reporter)](https://www.npmjs.com/package/@sentinelqa/playwright-reporter)
10
12
  [![downloads](https://img.shields.io/npm/dm/@sentinelqa/playwright-reporter)](https://www.npmjs.com/package/@sentinelqa/playwright-reporter)
11
13
  [![license](https://img.shields.io/npm/l/@sentinelqa/playwright-reporter)](./LICENSE)
12
14
 
13
- From failed CI run root cause in seconds.
14
- Get a shareable Playwright debugging link with traces, screenshots, and failure context — no setup required.
15
+ From failed CI run to root cause in seconds.
15
16
 
16
- Works with no account or API key required.
17
-
18
- Use it to get a shareable hosted run link from CI or local development, then upgrade to Sentinel Cloud for richer history and intelligence.
17
+ Works with no account and no API key.
19
18
 
20
19
  ![Sentinel Report Example](./docs/screenshot2.png)
21
- ![CLI Quick Diagnosis](./docs/CLI1.png)
22
-
23
- ## Features
24
-
25
- - Free hosted debugging links by default, with no account or API key required
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
36
-
37
- ## Why this exists
38
-
39
- Debugging Playwright failures usually means downloading traces, screenshots, and logs separately from CI.
40
-
41
- Reporter uploads those artifacts into a single hosted Sentinel run page so you can open one link, inspect failures fast, and share that link with the rest of the team.
42
-
43
- ## CLI diagnosis
44
-
45
- Sentinel is not just a report link.
46
-
47
- On failed runs, it prints a compact terminal diagnosis that answers:
20
+ ![CLI Quick Diagnosis](./docs/CLI2.png)
48
21
 
49
- 1. what broke
50
- 2. why it broke
51
- 3. where to look
52
- 4. what changed
53
- 5. what to do next
22
+ ## What It Does
54
23
 
55
- The goal is simple:
24
+ Sentinel explains Playwright failures locally, groups them into real root causes, and gives you a shareable link to inspect the run.
56
25
 
57
- you should not need to open logs first.
26
+ The open-source reporter is focused on one job:
58
27
 
59
- Typical CLI output:
28
+ - tell you what broke
29
+ - show why it failed
30
+ - point to the likely root cause
31
+ - tell you what to check next
60
32
 
61
- ```text
62
- Sentinel diagnosis
63
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
64
-
65
- NEW FAILURE after 8 passing runs
66
-
67
- What broke: 10 tests failed
68
- Why: collapsed into 2 real issues
69
-
70
- Issue 1: UI assertion mismatch (6 tests)
71
- Why: getByTestId('metric-pass-rate') showed "82%" instead of "88%"
72
- Where: app.spec.ts:43, app.spec.ts:69
73
- Expected: 88%
74
- Received: 82%
75
- What changed: "update analytics cards"
76
- Next: verify getByTestId('metric-pass-rate')
77
- Impact: 6 tests failing with same root cause
78
- Clears: fixing this likely clears 6 of 10 failures
79
- ```
33
+ ## Features
80
34
 
81
- On passed runs, Sentinel stays short and only prints a warning if there is a strong risk signal worth caring about.
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
82
43
 
83
- ## Why teams use the free version
44
+ ## Why Teams Use It
84
45
 
85
- - Drop one wrapper into `playwright.config.ts` and keep running `npx playwright test`
86
- - Get a hosted Sentinel debugging link automatically on failed runs
87
- - Share one public URL in Slack, PRs, or GitHub issues instead of passing around raw CI artifacts
88
- - See unified failures, grouped failure patterns, screenshots, and evidence in one place
89
- - Let teammates inspect the failure without needing your CI system or local machine
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
90
51
 
91
52
  ## Requirements
92
53
 
@@ -95,14 +56,6 @@ On passed runs, Sentinel stays short and only prints a warning if there is a str
95
56
 
96
57
  ## Quick Start
97
58
 
98
- `withSentinel()` is the default setup for everyone:
99
-
100
- - best for free and local users
101
- - zero-friction setup
102
- - hosted Sentinel report link is generated automatically
103
- - no `SENTINEL_TOKEN` required
104
- - AI summaries use trace and reporter evidence, but are less precise than live page capture
105
-
106
59
  Install:
107
60
 
108
61
  ```bash
@@ -131,80 +84,91 @@ export default withSentinel(
131
84
  );
132
85
  ```
133
86
 
134
- ## Example
135
-
136
- Run your Playwright tests:
87
+ Run your tests:
137
88
 
138
89
  ```bash
139
90
  npx playwright test
140
91
  ```
141
92
 
142
- If tests fail, Sentinel uploads a hosted debugging report and prints the shareable link in the terminal.
93
+ If tests fail, Sentinel uploads the run and prints a shareable link in the terminal.
143
94
 
144
- Open the hosted report to inspect:
95
+ ## CLI Output
145
96
 
146
- - failed tests across jobs
147
- - within-run grouped failures
148
- - screenshots and videos
149
- - trace links
150
- - parsed failure details
151
- - light summaries
152
- - shareable public debugging page
97
+ On failed runs, Sentinel prints a compact diagnosis that answers:
153
98
 
154
- The free hosted public flow is designed for distribution:
99
+ 1. What failed?
100
+ 2. What caused it?
101
+ 3. Where is it?
102
+ 4. What should I check next?
155
103
 
156
- - one shareable debugging link per run
157
- - public read-only pages
158
- - fast enough to use in CI comments and Slack threads
159
- - clear upgrade path into a full Sentinel workspace when teams want history, retention, and deeper analysis
104
+ Typical output:
160
105
 
161
- ## Modes
106
+ ```text
107
+ Sentinel diagnosis
108
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
162
109
 
163
- ### Free hosted mode
110
+ RECURRING FAILURE (12 previous runs)
111
+
112
+ ❌ 4 failures (grouped)
113
+ Collapsed into 2 real issues
114
+
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
122
+
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
+ ```
164
132
 
165
- If `SENTINEL_TOKEN` is not set, the reporter uploads the run to a hosted public Sentinel report and prints the shareable URL.
133
+ On passed runs, Sentinel stays quiet unless there is a strong risk signal worth surfacing.
166
134
 
167
- This free public flow includes:
135
+ ## What The Shared Report Shows
168
136
 
169
- - hosted run page
170
- - hosted failure pages
171
- - grouped failures inside the run
172
- - light summaries
173
- - copy/share actions
174
- - 48-hour share links
137
+ The hosted report is simple on purpose.
175
138
 
176
- ### Workspace mode
139
+ It focuses on:
177
140
 
178
- If `SENTINEL_TOKEN` is set, the reporter uploads into your Sentinel workspace instead of the free hosted public flow.
141
+ - grouped failures
142
+ - explanation of why each issue failed
143
+ - affected tests
144
+ - artifacts
145
+ - recent history
179
146
 
180
- ```bash
181
- SENTINEL_TOKEN=your_project_ingest_token npx playwright test
182
- ```
147
+ Open the link to inspect:
183
148
 
184
- For local runs outside CI, Sentinel will use your local git metadata automatically when available.
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
185
154
 
186
- ## What `withSentinel()` does
155
+ ## Free Hosted Mode
187
156
 
188
- - Preserves your existing reporter configuration
189
- - Injects a Playwright JSON reporter if one is missing
190
- - Sets sensible artifact defaults:
191
- - trace: `retain-on-failure`
192
- - screenshot: `only-on-failure`
193
- - video: `retain-on-failure`
194
- - Uploads the run to hosted Sentinel at the end of the test run
157
+ If `SENTINEL_TOKEN` is not set, the reporter uploads the run to a free hosted Sentinel report and prints the public share URL.
195
158
 
196
- ## Recommended Cloud Setup
159
+ This free flow includes:
197
160
 
198
- If you use Sentinel Cloud and want the best AI summaries and fix suggestions, keep `withSentinel()` in your Playwright config and add the live capture fixture.
161
+ - CLI diagnosis
162
+ - hosted run page
163
+ - grouped failures
164
+ - failure explanation
165
+ - public share links
199
166
 
200
- Why:
167
+ ## Optional Richer Capture
201
168
 
202
- - `withSentinel()` alone works from reporter and trace data
203
- - a Playwright reporter does not get the live `page` fixture
204
- - the live capture fixture lets Sentinel collect richer DOM and code context at the exact failure moment
205
- - this is required for the highest-quality DOM-aware patches
169
+ `withSentinel()` works on its own and is the simplest setup.
206
170
 
207
- Create one shared test wrapper:
171
+ If you want richer failure evidence, you can also attach the failure capture fixture:
208
172
 
209
173
  ```ts
210
174
  // tests/test.ts
@@ -215,20 +179,28 @@ export const test = attachSentinelFailureCapture(base);
215
179
  export { expect };
216
180
  ```
217
181
 
218
- Then import from that file in your specs instead of `@playwright/test`:
182
+ Then import from that file in your specs:
219
183
 
220
184
  ```ts
221
185
  import { test, expect } from "./test";
222
186
  ```
223
187
 
224
- Use this cloud setup when you want:
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
225
194
 
226
- - best AI summaries
227
- - best fix suggestions
228
- - richer DOM-aware diagnosis
229
- - more reliable code patches grounded in real page state
195
+ ## What `withSentinel()` Does
230
196
 
231
- Free and local-only users do not need this. The standard `withSentinel()` setup remains the simplest path and will upload a hosted Sentinel report automatically.
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
232
204
 
233
205
  ## Options
234
206
 
@@ -243,19 +215,12 @@ withSentinel(config, {
243
215
  });
244
216
  ```
245
217
 
246
- ## Sentinel Cloud (optional)
218
+ ## Workspace
247
219
 
248
- Sentinel Cloud adds:
220
+ If you want private run history, recurring issue tracking, and team access, sign up for a Sentinel workspace and set `SENTINEL_TOKEN`.
249
221
 
250
- - hosted debugging dashboards
251
- - CI run history
252
- - AI-generated failure summaries
253
- - flaky test detection
254
- - shareable run links
255
- - longer retention
256
- - compare against previous runs
257
- - recurring failure history
258
- - richer fix suggestions and team workflows
222
+ ```bash
223
+ SENTINEL_TOKEN=your_project_ingest_token npx playwright test
224
+ ```
259
225
 
260
- Free for up to 100 CI runs per month.
261
- Create an account at [sentinelqa.com](https://sentinelqa.com).
226
+ Create a workspace at [sentinelqa.com/register](https://sentinelqa.com/register).