@testomatio/reporter 1.6.6-beta-2-pw-metadata → 1.6.7
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/lib/client.js +1 -0
- package/lib/pipe/testomatio.js +3 -2
- package/lib/reporter-functions.js +6 -2
- package/lib/xmlReader.js +4 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
package/lib/pipe/testomatio.js
CHANGED
|
@@ -215,7 +215,7 @@ class TestomatioPipe {
|
|
|
215
215
|
this.store.runPublicUrl = this.runPublicUrl;
|
|
216
216
|
this.store.runId = this.runId;
|
|
217
217
|
console.log(APP_PREFIX, '📊 Report created. Report ID:', this.runId);
|
|
218
|
-
process.env.runId = this.runId;
|
|
218
|
+
process.env.runId = this.runId;
|
|
219
219
|
debug('Run created', this.runId);
|
|
220
220
|
} catch (err) {
|
|
221
221
|
const errorText = err.response?.data?.message || err.message;
|
|
@@ -241,7 +241,7 @@ class TestomatioPipe {
|
|
|
241
241
|
const cancelReporting = this.requestFailures >= parseInt(process.env.TESTOMATIO_MAX_REQUEST_FAILURES, 10);
|
|
242
242
|
if (cancelReporting) {
|
|
243
243
|
this.reportingCanceledDueToReqFailures = true;
|
|
244
|
-
const errorMessage =
|
|
244
|
+
const errorMessage =
|
|
245
245
|
`⚠️ ${process.env.TESTOMATIO_MAX_REQUEST_FAILURES} requests were failed, reporting to Testomat aborted.`;
|
|
246
246
|
console.warn(`${APP_PREFIX} ${chalk.yellow(errorMessage)}`);
|
|
247
247
|
}
|
|
@@ -396,6 +396,7 @@ class TestomatioPipe {
|
|
|
396
396
|
await this.axios.put(`/api/reporter/${this.runId}`, {
|
|
397
397
|
api_key: this.apiKey,
|
|
398
398
|
status_event,
|
|
399
|
+
detach: params.detach,
|
|
399
400
|
duration: params.duration,
|
|
400
401
|
tests: params.tests,
|
|
401
402
|
});
|
|
@@ -32,9 +32,13 @@ function addStep(message) {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Add key-value pair(s) to the test report
|
|
35
|
-
* @param {*} keyValue
|
|
35
|
+
* @param {*} keyValue or key
|
|
36
|
+
* @param {string?} value
|
|
36
37
|
*/
|
|
37
|
-
function setKeyValue(keyValue) {
|
|
38
|
+
function setKeyValue(keyValue, value = null) {
|
|
39
|
+
if (value && typeof keyValue === 'string') {
|
|
40
|
+
keyValue = { [keyValue]: value };
|
|
41
|
+
}
|
|
38
42
|
services.keyValues.put(keyValue);
|
|
39
43
|
}
|
|
40
44
|
|
package/lib/xmlReader.js
CHANGED
|
@@ -21,7 +21,8 @@ const config = require('./config');
|
|
|
21
21
|
const ridRunId = randomUUID();
|
|
22
22
|
|
|
23
23
|
const TESTOMATIO_URL = process.env.TESTOMATIO_URL || 'https://app.testomat.io';
|
|
24
|
-
const { TESTOMATIO_RUNGROUP_TITLE, TESTOMATIO_TITLE, TESTOMATIO_ENV, TESTOMATIO_RUN
|
|
24
|
+
const { TESTOMATIO_RUNGROUP_TITLE, TESTOMATIO_TITLE, TESTOMATIO_ENV, TESTOMATIO_RUN,
|
|
25
|
+
TESTOMATIO_MARK_DETACHED } = process.env;
|
|
25
26
|
|
|
26
27
|
const options = {
|
|
27
28
|
ignoreDeclaration: true,
|
|
@@ -41,6 +42,7 @@ class XmlReader {
|
|
|
41
42
|
title: TESTOMATIO_TITLE,
|
|
42
43
|
env: TESTOMATIO_ENV,
|
|
43
44
|
group_title: TESTOMATIO_RUNGROUP_TITLE,
|
|
45
|
+
detach: !!TESTOMATIO_MARK_DETACHED,
|
|
44
46
|
// batch uploading is implemented for xml already
|
|
45
47
|
isBatchEnabled: false,
|
|
46
48
|
};
|
|
@@ -424,6 +426,7 @@ class XmlReader {
|
|
|
424
426
|
|
|
425
427
|
const dataString = {
|
|
426
428
|
...this.stats,
|
|
429
|
+
detach: this.requestParams.detach,
|
|
427
430
|
api_key: this.requestParams.apiKey,
|
|
428
431
|
status: 'finished',
|
|
429
432
|
tests: this.tests,
|