@browsermation/test 0.0.63-beta.13 → 0.0.63-beta.15
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/dist/reporter.js +19 -11
- package/package.json +1 -1
package/dist/reporter.js
CHANGED
|
@@ -154,8 +154,7 @@ var BrowsermationReporter = class {
|
|
|
154
154
|
async onBegin(_config, suite) {
|
|
155
155
|
const data = {
|
|
156
156
|
type: "begin",
|
|
157
|
-
timestamp: Date.
|
|
158
|
-
hostname: (0, import_node_os.hostname)(),
|
|
157
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
159
158
|
git_branch: await this.getCurrentBranch(),
|
|
160
159
|
git_repo: await this.getCurrentRepo(),
|
|
161
160
|
git_commit_id: await this.getLatestCommitId(),
|
|
@@ -168,7 +167,7 @@ var BrowsermationReporter = class {
|
|
|
168
167
|
this.log(`${JSON.stringify(data)}
|
|
169
168
|
`);
|
|
170
169
|
const response = await this.sendData(data);
|
|
171
|
-
if (response
|
|
170
|
+
if (response?.data?.suite_run_id) {
|
|
172
171
|
this.suiteRunId = response.data.suite_run_id;
|
|
173
172
|
this.log(`Received suite_run_id: ${this.suiteRunId}`);
|
|
174
173
|
}
|
|
@@ -180,7 +179,7 @@ var BrowsermationReporter = class {
|
|
|
180
179
|
start_time: result.startTime,
|
|
181
180
|
duration_in_ms: result.duration,
|
|
182
181
|
status: result.status,
|
|
183
|
-
timestamp: Date.
|
|
182
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
184
183
|
};
|
|
185
184
|
this.log(`${JSON.stringify(data)}
|
|
186
185
|
`);
|
|
@@ -192,12 +191,14 @@ var BrowsermationReporter = class {
|
|
|
192
191
|
type: "test-start",
|
|
193
192
|
title: test.title,
|
|
194
193
|
file: test.location.file,
|
|
195
|
-
|
|
194
|
+
hostname: (0, import_node_os.hostname)(),
|
|
195
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
196
196
|
free_memory: (0, import_node_os.freemem)(),
|
|
197
197
|
total_memory: (0, import_node_os.totalmem)(),
|
|
198
198
|
cpus: (0, import_node_os.cpus)().length,
|
|
199
199
|
project: test.parent.project.name,
|
|
200
|
-
cpu_architecture: process.arch
|
|
200
|
+
cpu_architecture: process.arch,
|
|
201
|
+
retries: test.retries
|
|
201
202
|
};
|
|
202
203
|
this.log(`${JSON.stringify(data)}
|
|
203
204
|
`);
|
|
@@ -210,13 +211,20 @@ var BrowsermationReporter = class {
|
|
|
210
211
|
type: "test-end",
|
|
211
212
|
title: test.title,
|
|
212
213
|
title_path: test.titlePath,
|
|
214
|
+
result: result.status,
|
|
213
215
|
status: result.status,
|
|
214
|
-
|
|
216
|
+
duration_in_ms: result.duration,
|
|
215
217
|
errors: stripAnsi(result.error?.message || ""),
|
|
216
|
-
timestamp: Date.
|
|
218
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
217
219
|
free_memory: (0, import_node_os.freemem)(),
|
|
218
220
|
total_memory: (0, import_node_os.totalmem)(),
|
|
219
|
-
cpu_architecture: process.arch
|
|
221
|
+
cpu_architecture: process.arch,
|
|
222
|
+
cpus: (0, import_node_os.cpus)().length,
|
|
223
|
+
hostname: (0, import_node_os.hostname)(),
|
|
224
|
+
retries: test.retries,
|
|
225
|
+
retry_attempt: result.retry,
|
|
226
|
+
stderr: result.stderr.map((s) => stripAnsi(s.toString())).join("\n"),
|
|
227
|
+
stdout: result.stdout.map((s) => stripAnsi(s.toString())).join("\n")
|
|
220
228
|
};
|
|
221
229
|
this.log(`${JSON.stringify(data)}
|
|
222
230
|
`);
|
|
@@ -228,7 +236,7 @@ var BrowsermationReporter = class {
|
|
|
228
236
|
suite_run_id: this.suiteRunId,
|
|
229
237
|
message: error.message,
|
|
230
238
|
stack: error.stack,
|
|
231
|
-
timestamp: Date.
|
|
239
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
232
240
|
};
|
|
233
241
|
console.error(`${JSON.stringify(data)}
|
|
234
242
|
`);
|
|
@@ -238,7 +246,7 @@ var BrowsermationReporter = class {
|
|
|
238
246
|
const data = {
|
|
239
247
|
type: "exit",
|
|
240
248
|
suite_run_id: this.suiteRunId,
|
|
241
|
-
timestamp: Date.
|
|
249
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
242
250
|
};
|
|
243
251
|
this.log(`${JSON.stringify(data)}
|
|
244
252
|
`);
|