@qualflare/playwright 0.1.0 → 0.3.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 +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/reporter/index.cjs +114 -6
- package/dist/reporter/index.cjs.map +1 -1
- package/dist/reporter/index.d.cts +2 -2
- package/dist/reporter/index.d.ts +2 -2
- package/dist/reporter/index.js +114 -6
- package/dist/reporter/index.js.map +1 -1
- package/dist/{resolve-config-CSjXFl7v.d.cts → resolve-config-N04M1Avn.d.cts} +67 -0
- package/dist/{resolve-config-CSjXFl7v.d.ts → resolve-config-N04M1Avn.d.ts} +67 -0
- package/package.json +1 -1
|
@@ -34,6 +34,14 @@ interface Metadata {
|
|
|
34
34
|
version: string;
|
|
35
35
|
timestamp: string;
|
|
36
36
|
cliName: string;
|
|
37
|
+
/** Identifier every shard of ONE run shares. `qualflare-cli collect` groups
|
|
38
|
+
* the report files in a directory by this and refuses to upload when more
|
|
39
|
+
* than one distinct run is present, so a file left over from an earlier run
|
|
40
|
+
* cannot be merged silently into this launch.
|
|
41
|
+
*
|
|
42
|
+
* Optional because reports written by earlier releases have none; the CLI
|
|
43
|
+
* treats those as "unknown run" and never blocks on them. */
|
|
44
|
+
runId?: string;
|
|
37
45
|
}
|
|
38
46
|
interface Label {
|
|
39
47
|
/** Required, max 128 chars. Allure-style arbitrary label name — epic/feature/story/owner/severity
|
|
@@ -103,6 +111,52 @@ interface Attachment {
|
|
|
103
111
|
* Omit for a case-level (not step-level) attachment. */
|
|
104
112
|
stepIndex?: number;
|
|
105
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* One execution of a test, when the framework retried it.
|
|
116
|
+
*
|
|
117
|
+
* Sent as `Case.attempts`, persisted per-attempt server-side (see
|
|
118
|
+
* `case_run_attempts`). This is what lets a report answer "what failed on the
|
|
119
|
+
* first try?" rather than only "it was retried twice" — `retryCount`/`isFlaky`
|
|
120
|
+
* are aggregates and cannot.
|
|
121
|
+
*
|
|
122
|
+
* Three rules the server relies on:
|
|
123
|
+
*
|
|
124
|
+
* 1. **Send every attempt, including the final one**, numbered 1..N. The
|
|
125
|
+
* server treats the highest-numbered attempt as the final execution and
|
|
126
|
+
* overwrites its `status`/`duration` from the Case itself, so the two can
|
|
127
|
+
* never disagree — but it keeps this attempt's own `message`/`trace`, which
|
|
128
|
+
* is precisely why the final attempt must be sent rather than inferred.
|
|
129
|
+
* 2. **Fewer than two attempts persists nothing.** A test that ran once has no
|
|
130
|
+
* history worth storing, so omit `attempts` entirely rather than sending a
|
|
131
|
+
* single-element array; it is bytes against the 10MB body limit for a row
|
|
132
|
+
* the server will discard.
|
|
133
|
+
* 3. **`attempt` must be >= 1.** Zero-based numbering is silently dropped.
|
|
134
|
+
*/
|
|
135
|
+
interface Attempt {
|
|
136
|
+
/** 1-based. Must be >= 1; the server drops anything lower. */
|
|
137
|
+
attempt: number;
|
|
138
|
+
status: CaseStatus;
|
|
139
|
+
/** NANOSECONDS — see `NanosecondDuration`. */
|
|
140
|
+
duration?: NanosecondDuration;
|
|
141
|
+
/** ISO-8601. When this attempt started. */
|
|
142
|
+
startedAt?: string;
|
|
143
|
+
/** The framework's own id for this attempt, passed through untouched.
|
|
144
|
+
* Max 255 chars server-side. */
|
|
145
|
+
attemptId?: string;
|
|
146
|
+
/** Truncated server-side at 8192 runes, never validation-rejected. */
|
|
147
|
+
message?: string;
|
|
148
|
+
/** Stack trace. Truncated server-side at 32768 runes. */
|
|
149
|
+
trace?: string;
|
|
150
|
+
/** Source snippet. Truncated server-side at 4096 runes. */
|
|
151
|
+
snippet?: string;
|
|
152
|
+
/** 1-based source line the failure points at. */
|
|
153
|
+
line?: number;
|
|
154
|
+
/** Captured stdout, one entry per line. Server keeps the first 200 lines,
|
|
155
|
+
* then truncates to 16384 runes. */
|
|
156
|
+
stdout?: string[];
|
|
157
|
+
/** Captured stderr, same bounds as `stdout`. */
|
|
158
|
+
stderr?: string[];
|
|
159
|
+
}
|
|
106
160
|
interface Case {
|
|
107
161
|
/** Required. A stable per-test identifier used for flaky-history matching
|
|
108
162
|
* across separate runs — must stay the same for what a human would call
|
|
@@ -118,6 +172,10 @@ interface Case {
|
|
|
118
172
|
/** NANOSECONDS — see `NanosecondDuration`. */
|
|
119
173
|
duration: NanosecondDuration;
|
|
120
174
|
retryCount?: number;
|
|
175
|
+
/** Per-attempt execution history, present only when the framework retried
|
|
176
|
+
* this test (>= 2 entries). Omitted otherwise — a single attempt persists
|
|
177
|
+
* nothing server-side. See `Attempt`. */
|
|
178
|
+
attempts?: Attempt[];
|
|
121
179
|
isFlaky?: boolean;
|
|
122
180
|
/** Truncated server-side at 65536 runes, never validation-rejected — send
|
|
123
181
|
* the full error/stack text, don't pre-truncate. */
|
|
@@ -218,6 +276,14 @@ interface QualflarePlaywrightOptions {
|
|
|
218
276
|
ciBuildNumber?: string;
|
|
219
277
|
ciRunUrl?: string;
|
|
220
278
|
ciPrNumber?: number;
|
|
279
|
+
/** Identifier shared by every shard of one run, written into the report as
|
|
280
|
+
* `metadata.runId`. `qualflare-cli collect` groups files by it and refuses
|
|
281
|
+
* to merge a stale report from an earlier run into this launch.
|
|
282
|
+
*
|
|
283
|
+
* Auto-detected from CI. Outside CI it falls back to a per-process UUID,
|
|
284
|
+
* which is correct there: every local run is a distinct run, so a leftover
|
|
285
|
+
* file is still caught. */
|
|
286
|
+
runId?: string;
|
|
221
287
|
attachScreenshots?: boolean;
|
|
222
288
|
/** Include Playwright's runner-internal steps — `pw:api` (every
|
|
223
289
|
* `page.click()`, `locator.fill()`, ...) and `fixture` (the implicit
|
|
@@ -278,6 +344,7 @@ interface ResolvedReporterConfig {
|
|
|
278
344
|
ciBuildNumber?: string;
|
|
279
345
|
ciRunUrl?: string;
|
|
280
346
|
ciPrNumber?: number;
|
|
347
|
+
runId: string;
|
|
281
348
|
attachScreenshots: boolean;
|
|
282
349
|
includeApiSteps: boolean;
|
|
283
350
|
maxAttachmentBytes: number;
|