newman-reporter-qase 2.0.4 → 2.1.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/changelog.md +13 -0
- package/dist/reporter.d.ts +1 -1
- package/dist/reporter.js +36 -24
- package/package.json +2 -2
package/changelog.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# qase-newman@2.1.0
|
|
2
|
+
|
|
3
|
+
## What's new
|
|
4
|
+
|
|
5
|
+
- Updated to the latest minor version of the common package for improved compatibility and features.
|
|
6
|
+
- Fixed all ESLint warnings across the project to ensure code quality and maintainability.
|
|
7
|
+
|
|
8
|
+
# qase-newman@2.0.5
|
|
9
|
+
|
|
10
|
+
## What's new
|
|
11
|
+
|
|
12
|
+
Enhanced handling of start and end times for tests and steps, ensuring greater accuracy in reporting.
|
|
13
|
+
|
|
1
14
|
# qase-newman@2.0.4
|
|
2
15
|
|
|
3
16
|
## What's new
|
package/dist/reporter.d.ts
CHANGED
package/dist/reporter.js
CHANGED
|
@@ -11,6 +11,14 @@ const qase_javascript_commons_1 = require("qase-javascript-commons");
|
|
|
11
11
|
* @class NewmanQaseReporter
|
|
12
12
|
*/
|
|
13
13
|
class NewmanQaseReporter {
|
|
14
|
+
/**
|
|
15
|
+
* @type {RegExp}
|
|
16
|
+
*/
|
|
17
|
+
static qaseIdRegExp = /\/\/\s*?[qQ]ase:\s?((?:[\d]+[\s,]{0,})+)/;
|
|
18
|
+
/**
|
|
19
|
+
* @type {RegExp}
|
|
20
|
+
*/
|
|
21
|
+
static qaseParamRegExp = /qase\.parameters:\s*([\w.]+(?:\s*,\s*[\w.]+)*)/i;
|
|
14
22
|
/**
|
|
15
23
|
* @param {EventList} eventList
|
|
16
24
|
* @returns {number[]}
|
|
@@ -70,6 +78,31 @@ class NewmanQaseReporter {
|
|
|
70
78
|
}
|
|
71
79
|
return titles;
|
|
72
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @type {ReporterInterface}
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
reporter;
|
|
86
|
+
/**
|
|
87
|
+
* @type {Map<string, TestResultType>}
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
pendingResultMap = new Map();
|
|
91
|
+
/**
|
|
92
|
+
* @type {Map<string, number>}
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
timerMap = new Map();
|
|
96
|
+
/**
|
|
97
|
+
* @type {Record<string, string>[]}
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
parameters = [];
|
|
101
|
+
/**
|
|
102
|
+
* @type {boolean}
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
autoCollectParams;
|
|
73
106
|
/**
|
|
74
107
|
* @param {EventEmitter} emitter
|
|
75
108
|
* @param {NewmanQaseOptionsType} options
|
|
@@ -77,21 +110,6 @@ class NewmanQaseReporter {
|
|
|
77
110
|
* @param {ConfigLoaderInterface} configLoader
|
|
78
111
|
*/
|
|
79
112
|
constructor(emitter, options, collectionOptions, configLoader = new qase_javascript_commons_1.ConfigLoader(configSchema_1.configSchema)) {
|
|
80
|
-
/**
|
|
81
|
-
* @type {Map<string, TestResultType>}
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
this.pendingResultMap = new Map();
|
|
85
|
-
/**
|
|
86
|
-
* @type {Map<string, number>}
|
|
87
|
-
* @private
|
|
88
|
-
*/
|
|
89
|
-
this.timerMap = new Map();
|
|
90
|
-
/**
|
|
91
|
-
* @type {Record<string, string>[]}
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
this.parameters = [];
|
|
95
113
|
const config = configLoader.load();
|
|
96
114
|
this.reporter = qase_javascript_commons_1.QaseReporter.getInstance({
|
|
97
115
|
...(0, qase_javascript_commons_1.composeOptions)(options, config),
|
|
@@ -173,6 +191,8 @@ class NewmanQaseReporter {
|
|
|
173
191
|
if (timer) {
|
|
174
192
|
const now = Date.now();
|
|
175
193
|
pendingResult.execution.duration = now - timer;
|
|
194
|
+
pendingResult.execution.start_time = timer / 1000;
|
|
195
|
+
pendingResult.execution.end_time = now / 1000;
|
|
176
196
|
}
|
|
177
197
|
pendingResult.params = this.prepareParameters(item, exec.cursor.iteration);
|
|
178
198
|
void this.reporter.addTestResult(pendingResult);
|
|
@@ -244,7 +264,7 @@ class NewmanQaseReporter {
|
|
|
244
264
|
}, {});
|
|
245
265
|
}
|
|
246
266
|
/**
|
|
247
|
-
* @param {
|
|
267
|
+
* @param {unknown} iterationData
|
|
248
268
|
* @private
|
|
249
269
|
*/
|
|
250
270
|
getParameters(iterationData) {
|
|
@@ -289,11 +309,3 @@ class NewmanQaseReporter {
|
|
|
289
309
|
}
|
|
290
310
|
}
|
|
291
311
|
exports.NewmanQaseReporter = NewmanQaseReporter;
|
|
292
|
-
/**
|
|
293
|
-
* @type {RegExp}
|
|
294
|
-
*/
|
|
295
|
-
NewmanQaseReporter.qaseIdRegExp = /\/\/\s*?[qQ]ase:\s?((?:[\d]+[\s,]{0,})+)/;
|
|
296
|
-
/**
|
|
297
|
-
* @type {RegExp}
|
|
298
|
-
*/
|
|
299
|
-
NewmanQaseReporter.qaseParamRegExp = /qase\.parameters:\s*([\w.]+(?:\s*,\s*[\w.]+)*)/i;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newman-reporter-qase",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Qase TMS Newman Reporter",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"author": "Qase Team <support@qase.io>",
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"qase-javascript-commons": "~2.
|
|
42
|
+
"qase-javascript-commons": "~2.3.0",
|
|
43
43
|
"semver": "^7.5.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|