@testomatio/reporter 1.6.11-beta1.s3-fix → 1.6.12
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/uploader.js +1 -1
- package/lib/xmlReader.js +7 -6
- package/package.json +1 -1
package/lib/uploader.js
CHANGED
|
@@ -317,7 +317,7 @@ class S3Uploader {
|
|
|
317
317
|
async getS3LocationLink(out) {
|
|
318
318
|
const response = await out.done();
|
|
319
319
|
|
|
320
|
-
let s3Location = response?.Location;
|
|
320
|
+
let s3Location = response?.Location?.trim();
|
|
321
321
|
|
|
322
322
|
if (!s3Location) {
|
|
323
323
|
s3Location = out?.singleUploadResult?.Location;
|
package/lib/xmlReader.js
CHANGED
|
@@ -42,7 +42,7 @@ class XmlReader {
|
|
|
42
42
|
title: TESTOMATIO_TITLE,
|
|
43
43
|
env: TESTOMATIO_ENV,
|
|
44
44
|
group_title: TESTOMATIO_RUNGROUP_TITLE,
|
|
45
|
-
detach:
|
|
45
|
+
detach: TESTOMATIO_MARK_DETACHED,
|
|
46
46
|
// batch uploading is implemented for xml already
|
|
47
47
|
isBatchEnabled: false,
|
|
48
48
|
};
|
|
@@ -109,7 +109,7 @@ class XmlReader {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
processJUnit(jsonSuite) {
|
|
112
|
-
const { testsuite, name, tests, failures, errors
|
|
112
|
+
const { testsuite, name, tests, failures, errors } = jsonSuite;
|
|
113
113
|
|
|
114
114
|
reduceOptions.preferClassname = this.stats.language === 'python';
|
|
115
115
|
const resultTests = processTestSuite(testsuite);
|
|
@@ -117,6 +117,8 @@ class XmlReader {
|
|
|
117
117
|
const hasFailures = resultTests.filter(t => t.status === 'failed').length > 0;
|
|
118
118
|
const status = failures > 0 || errors > 0 || hasFailures ? 'failed' : 'passed';
|
|
119
119
|
|
|
120
|
+
const time = testsuite.time || 0;
|
|
121
|
+
// debug('time', jsonSuite, time)
|
|
120
122
|
if (time) {
|
|
121
123
|
if (!this.stats.duration) this.stats.duration = 0;
|
|
122
124
|
this.stats.duration += parseFloat(time);
|
|
@@ -419,19 +421,18 @@ class XmlReader {
|
|
|
419
421
|
this.formatErrors();
|
|
420
422
|
this.formatTests();
|
|
421
423
|
|
|
422
|
-
debug('Uploading data', {
|
|
423
|
-
...this.stats,
|
|
424
|
-
tests: this.tests,
|
|
425
|
-
});
|
|
426
424
|
|
|
427
425
|
const dataString = {
|
|
428
426
|
...this.stats,
|
|
429
427
|
detach: this.requestParams.detach,
|
|
430
428
|
api_key: this.requestParams.apiKey,
|
|
431
429
|
status: 'finished',
|
|
430
|
+
duration: this.stats.duration,
|
|
432
431
|
tests: this.tests,
|
|
433
432
|
};
|
|
434
433
|
|
|
434
|
+
debug('Uploading data', dataString);
|
|
435
|
+
|
|
435
436
|
return Promise.all(this.pipes.map(p => p.finishRun(dataString)));
|
|
436
437
|
}
|
|
437
438
|
|