@qualflare/playwright 0.2.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.
@@ -111,6 +111,52 @@ interface Attachment {
111
111
  * Omit for a case-level (not step-level) attachment. */
112
112
  stepIndex?: number;
113
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
+ }
114
160
  interface Case {
115
161
  /** Required. A stable per-test identifier used for flaky-history matching
116
162
  * across separate runs — must stay the same for what a human would call
@@ -126,6 +172,10 @@ interface Case {
126
172
  /** NANOSECONDS — see `NanosecondDuration`. */
127
173
  duration: NanosecondDuration;
128
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[];
129
179
  isFlaky?: boolean;
130
180
  /** Truncated server-side at 65536 runes, never validation-rejected — send
131
181
  * the full error/stack text, don't pre-truncate. */
@@ -111,6 +111,52 @@ interface Attachment {
111
111
  * Omit for a case-level (not step-level) attachment. */
112
112
  stepIndex?: number;
113
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
+ }
114
160
  interface Case {
115
161
  /** Required. A stable per-test identifier used for flaky-history matching
116
162
  * across separate runs — must stay the same for what a human would call
@@ -126,6 +172,10 @@ interface Case {
126
172
  /** NANOSECONDS — see `NanosecondDuration`. */
127
173
  duration: NanosecondDuration;
128
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[];
129
179
  isFlaky?: boolean;
130
180
  /** Truncated server-side at 65536 runes, never validation-rejected — send
131
181
  * the full error/stack text, don't pre-truncate. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualflare/playwright",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Native Playwright reporter for the Qualflare test-management platform.",
5
5
  "keywords": [
6
6
  "qualflare",