@alex_neo/playwright-azure-reporter 1.2.0-beta.2 → 1.3.1-beta.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/README.md +25 -2
- package/dist/playwright-azure-reporter.d.ts +2 -0
- package/dist/playwright-azure-reporter.js +340 -525
- package/dist/playwright-azure-reporter.js.map +1 -1
- package/package.json +1 -1
- package/tests/example.spec.ts +25 -13
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.3.1-beta.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.3.0-beta.0...v1.3.1-beta.0) (2022-12-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# [1.3.0-beta.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.2.0-beta.2...v1.3.0-beta.0) (2022-10-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* define multiple test cases for a single test ([a89847a](https://github.com/alexneo2003/playwright-azure-reporter/commit/a89847acd8a4115cfb54329b27c7941ac403a792))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
# [1.2.0-beta.2](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.2.0-beta.1...v1.2.0-beta.2) (2022-10-14)
|
|
2
15
|
|
|
3
16
|
|
package/README.md
CHANGED
|
@@ -12,6 +12,13 @@ You must register an ID already existing test cases from Azure DevOps before run
|
|
|
12
12
|
|
|
13
13
|
> **You need write testCaseId wraped in square brackets at the test name.**
|
|
14
14
|
|
|
15
|
+
You can define multiple test cases for a single test with next format:
|
|
16
|
+
|
|
17
|
+
- `[1] Test name` - single test case
|
|
18
|
+
- `[1,2,3] Test name` - multiple test cases
|
|
19
|
+
- `[16, 17, 18] Test name` - multiple test cases with spaces
|
|
20
|
+
- `[1, 2, 3] Test name [4] Test name [5][6] Test name` - with combined format
|
|
21
|
+
|
|
15
22
|
For example:
|
|
16
23
|
|
|
17
24
|
```typescript
|
|
@@ -20,17 +27,33 @@ describe('Test suite', () => {
|
|
|
20
27
|
expect(true).toBe(true);
|
|
21
28
|
});
|
|
22
29
|
|
|
23
|
-
test('[3]
|
|
30
|
+
test('Correct test [3]', () => {
|
|
24
31
|
expect(true).toBe(true);
|
|
25
32
|
});
|
|
26
33
|
|
|
27
|
-
test.skip('[4]
|
|
34
|
+
test.skip('Skipped test [4]', () => {
|
|
28
35
|
expect(true).toBe(true);
|
|
29
36
|
});
|
|
30
37
|
|
|
31
38
|
test('[6] Failed test', () => {
|
|
32
39
|
expect(true).toBe(false);
|
|
33
40
|
});
|
|
41
|
+
|
|
42
|
+
test('[7] Test seven [8] Test eight [9] Test nine', () => {
|
|
43
|
+
expect(true).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('[10,11,12] Test ten, eleven, twelve', () => {
|
|
47
|
+
expect(true).toBe(true);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('[13, 14, 15] Test thirteen, fourteen, fifteen', () => {
|
|
51
|
+
expect(true).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('[16, 17, 18] Test sixteen, seventeen, eighteen [19] Test nineteen', () => {
|
|
55
|
+
expect(true).toBe(true);
|
|
56
|
+
});
|
|
34
57
|
});
|
|
35
58
|
```
|
|
36
59
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as TestInterfaces from 'azure-devops-node-api/interfaces/TestInterfaces';
|
|
2
2
|
import { Reporter, TestCase, TestResult } from '@playwright/test/reporter';
|
|
3
3
|
export declare function createGuid(): string;
|
|
4
|
+
export declare function shortID(): string;
|
|
4
5
|
declare const attachmentTypesArray: readonly ["screenshot", "video", "trace"];
|
|
5
6
|
declare type TAttachmentType = Array<typeof attachmentTypesArray[number]>;
|
|
6
7
|
declare type TTestRunConfig = Omit<TestInterfaces.RunCreateModel, 'name' | 'automated' | 'plan' | 'pointIds'> | undefined;
|
|
@@ -37,6 +38,7 @@ declare class AzureDevOpsReporter implements Reporter {
|
|
|
37
38
|
private resolveRunId;
|
|
38
39
|
private rejectRunId;
|
|
39
40
|
private testRunConfig;
|
|
41
|
+
private azureClientOptions;
|
|
40
42
|
constructor(options: AzureReporterOptions);
|
|
41
43
|
_validateOptions(options: AzureReporterOptions): void;
|
|
42
44
|
onBegin(): Promise<void>;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -33,57 +22,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
22
|
__setModuleDefault(result, mod);
|
|
34
23
|
return result;
|
|
35
24
|
};
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
-
function step(op) {
|
|
50
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
-
while (_) try {
|
|
52
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
-
switch (op[0]) {
|
|
55
|
-
case 0: case 1: t = op; break;
|
|
56
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
-
default:
|
|
60
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
-
if (t[2]) _.ops.pop();
|
|
65
|
-
_.trys.pop(); continue;
|
|
66
|
-
}
|
|
67
|
-
op = body.call(thisArg, _);
|
|
68
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
73
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
27
|
};
|
|
75
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
exports.createGuid = void 0;
|
|
29
|
+
exports.shortID = exports.createGuid = void 0;
|
|
77
30
|
/* eslint-disable no-unused-vars */
|
|
78
31
|
/* eslint-disable no-control-regex */
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
32
|
+
const azdev = __importStar(require("azure-devops-node-api"));
|
|
33
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
34
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
35
|
+
const fs_1 = require("fs");
|
|
83
36
|
function createGuid() {
|
|
84
37
|
return crypto_1.default.randomBytes(16).toString('hex');
|
|
85
38
|
}
|
|
86
39
|
exports.createGuid = createGuid;
|
|
40
|
+
function shortID() {
|
|
41
|
+
return crypto_1.default.randomBytes(8).toString('hex');
|
|
42
|
+
}
|
|
43
|
+
exports.shortID = shortID;
|
|
87
44
|
var AzureTestStatuses;
|
|
88
45
|
(function (AzureTestStatuses) {
|
|
89
46
|
AzureTestStatuses["passed"] = "Passed";
|
|
@@ -92,104 +49,72 @@ var AzureTestStatuses;
|
|
|
92
49
|
AzureTestStatuses["timedOut"] = "Failed";
|
|
93
50
|
AzureTestStatuses["interrupted"] = "Failed";
|
|
94
51
|
})(AzureTestStatuses || (AzureTestStatuses = {}));
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
case 0:
|
|
125
|
-
routeValues = {
|
|
126
|
-
project: projectName,
|
|
127
|
-
runId: runId,
|
|
128
|
-
};
|
|
129
|
-
_a.label = 1;
|
|
130
|
-
case 1:
|
|
131
|
-
_a.trys.push([1, 4, , 5]);
|
|
132
|
-
return [4 /*yield*/, this.vsoClient.getVersioningData('5.0-preview.5', 'Test', '4637d869-3a76-4468-8057-0bb02aa385cf', routeValues)];
|
|
133
|
-
case 2:
|
|
134
|
-
verData = _a.sent();
|
|
135
|
-
url = verData.requestUrl;
|
|
136
|
-
options = this.createRequestOptions('application/json', verData.apiVersion);
|
|
137
|
-
return [4 /*yield*/, this.rest.create(url, results, options)];
|
|
138
|
-
case 3:
|
|
139
|
-
res = _a.sent();
|
|
140
|
-
resolve(res);
|
|
141
|
-
return [3 /*break*/, 5];
|
|
142
|
-
case 4:
|
|
143
|
-
error_1 = _a.sent();
|
|
144
|
-
reject(error_1);
|
|
145
|
-
return [3 /*break*/, 5];
|
|
146
|
-
case 5: return [2 /*return*/];
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}); });
|
|
150
|
-
};
|
|
151
|
-
return api;
|
|
152
|
-
};
|
|
153
|
-
this.runIdPromise = new Promise(function (resolve, reject) {
|
|
154
|
-
_this.resolveRunId = resolve;
|
|
155
|
-
_this.rejectRunId = reject;
|
|
52
|
+
const attachmentTypesArray = ['screenshot', 'video', 'trace'];
|
|
53
|
+
class AzureDevOpsReporter {
|
|
54
|
+
testApi;
|
|
55
|
+
coreApi;
|
|
56
|
+
publishedResultsCount = 0;
|
|
57
|
+
resultsToBePublished = [];
|
|
58
|
+
connection;
|
|
59
|
+
orgUrl;
|
|
60
|
+
projectName;
|
|
61
|
+
environment;
|
|
62
|
+
planId = 0;
|
|
63
|
+
logging = false;
|
|
64
|
+
isDisabled = false;
|
|
65
|
+
testRunTitle = '';
|
|
66
|
+
uploadAttachments = false;
|
|
67
|
+
attachmentsType;
|
|
68
|
+
token = '';
|
|
69
|
+
runIdPromise;
|
|
70
|
+
resolveRunId = () => { };
|
|
71
|
+
rejectRunId = () => { };
|
|
72
|
+
testRunConfig = {};
|
|
73
|
+
azureClientOptions = {
|
|
74
|
+
allowRetries: true,
|
|
75
|
+
maxRetries: 20,
|
|
76
|
+
};
|
|
77
|
+
constructor(options) {
|
|
78
|
+
this.runIdPromise = new Promise((resolve, reject) => {
|
|
79
|
+
this.resolveRunId = resolve;
|
|
80
|
+
this.rejectRunId = reject;
|
|
156
81
|
})
|
|
157
|
-
.then(
|
|
82
|
+
.then((runId) => {
|
|
158
83
|
return runId;
|
|
159
84
|
})
|
|
160
|
-
.catch(
|
|
161
|
-
|
|
162
|
-
|
|
85
|
+
.catch((error) => {
|
|
86
|
+
this._warning(error);
|
|
87
|
+
this.isDisabled = true;
|
|
163
88
|
});
|
|
164
89
|
this._validateOptions(options);
|
|
165
90
|
}
|
|
166
|
-
|
|
167
|
-
if (options
|
|
91
|
+
_validateOptions(options) {
|
|
92
|
+
if (options?.isDisabled) {
|
|
168
93
|
this.isDisabled = true;
|
|
169
94
|
return;
|
|
170
95
|
}
|
|
171
|
-
if (!
|
|
96
|
+
if (!options?.orgUrl) {
|
|
172
97
|
this._warning("'orgUrl' is not set. Reporting is disabled.");
|
|
173
98
|
this.isDisabled = true;
|
|
174
99
|
return;
|
|
175
100
|
}
|
|
176
|
-
if (!
|
|
101
|
+
if (!options?.projectName) {
|
|
177
102
|
this._warning("'projectName' is not set. Reporting is disabled.");
|
|
178
103
|
this.isDisabled = true;
|
|
179
104
|
return;
|
|
180
105
|
}
|
|
181
|
-
if (!
|
|
106
|
+
if (!options?.planId) {
|
|
182
107
|
this._warning("'planId' is not set. Reporting is disabled.");
|
|
183
108
|
this.isDisabled = true;
|
|
184
109
|
return;
|
|
185
110
|
}
|
|
186
|
-
if (!
|
|
111
|
+
if (!options?.token) {
|
|
187
112
|
this._warning("'token' is not set. Reporting is disabled.");
|
|
188
113
|
this.isDisabled = true;
|
|
189
114
|
return;
|
|
190
115
|
}
|
|
191
|
-
if (options
|
|
192
|
-
if (!
|
|
116
|
+
if (options?.uploadAttachments) {
|
|
117
|
+
if (!options?.attachmentsType) {
|
|
193
118
|
this._warning("'attachmentsType' is not set. Attachments Type will be set to 'screenshot' by default.");
|
|
194
119
|
this.attachmentsType = ['screenshot'];
|
|
195
120
|
}
|
|
@@ -202,436 +127,326 @@ var AzureDevOpsReporter = /** @class */ (function () {
|
|
|
202
127
|
this.planId = options.planId;
|
|
203
128
|
this.logging = options.logging || false;
|
|
204
129
|
this.token = options.token;
|
|
205
|
-
this.environment =
|
|
130
|
+
this.environment = options?.environment || undefined;
|
|
206
131
|
this.testRunTitle =
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
this.uploadAttachments =
|
|
210
|
-
this.connection = new azdev.WebApi(this.orgUrl, azdev.getPersonalAccessTokenHandler(this.token));
|
|
211
|
-
this.testRunConfig =
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
_a.label = 1;
|
|
269
|
-
case 1:
|
|
270
|
-
_a.trys.push([1, 4, , 5]);
|
|
271
|
-
return [4 /*yield*/, this.runIdPromise];
|
|
272
|
-
case 2:
|
|
273
|
-
runId = _a.sent();
|
|
274
|
-
if (!runId)
|
|
275
|
-
return [2 /*return*/];
|
|
276
|
-
this._logTestItem(test, testResult);
|
|
277
|
-
return [4 /*yield*/, this._publishCaseResult(test, testResult)];
|
|
278
|
-
case 3:
|
|
279
|
-
_a.sent();
|
|
280
|
-
return [3 /*break*/, 5];
|
|
281
|
-
case 4:
|
|
282
|
-
error_3 = _a.sent();
|
|
283
|
-
this._warning("Failed to publish test result. \n ".concat(error_3.message));
|
|
284
|
-
return [3 /*break*/, 5];
|
|
285
|
-
case 5: return [2 /*return*/];
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
AzureDevOpsReporter.prototype.onEnd = function () {
|
|
291
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
292
|
-
var runId, prevCount, _a, runUpdatedResponse, error_4;
|
|
293
|
-
return __generator(this, function (_b) {
|
|
294
|
-
switch (_b.label) {
|
|
295
|
-
case 0:
|
|
296
|
-
if (this.isDisabled)
|
|
297
|
-
return [2 /*return*/];
|
|
298
|
-
_b.label = 1;
|
|
299
|
-
case 1:
|
|
300
|
-
_b.trys.push([1, 9, , 10]);
|
|
301
|
-
return [4 /*yield*/, this.runIdPromise];
|
|
302
|
-
case 2:
|
|
303
|
-
runId = _b.sent();
|
|
304
|
-
prevCount = this.resultsToBePublished.length;
|
|
305
|
-
_b.label = 3;
|
|
306
|
-
case 3:
|
|
307
|
-
if (!(this.resultsToBePublished.length > 0)) return [3 /*break*/, 5];
|
|
308
|
-
// need wait all results to be published
|
|
309
|
-
if (prevCount > this.resultsToBePublished.length) {
|
|
310
|
-
this._log(chalk_1.default.gray("Waiting for all results to be published. Remaining ".concat(this.resultsToBePublished.length, " results")));
|
|
311
|
-
prevCount--;
|
|
312
|
-
}
|
|
313
|
-
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 250); })];
|
|
314
|
-
case 4:
|
|
315
|
-
_b.sent();
|
|
316
|
-
return [3 /*break*/, 3];
|
|
317
|
-
case 5:
|
|
318
|
-
if (this.publishedResultsCount === 0 && !runId) {
|
|
319
|
-
this._log(chalk_1.default.gray('No testcases were matched. Ensure that your tests are declared correctly.'));
|
|
320
|
-
return [2 /*return*/];
|
|
321
|
-
}
|
|
322
|
-
if (!!this.testApi) return [3 /*break*/, 7];
|
|
323
|
-
_a = this;
|
|
324
|
-
return [4 /*yield*/, this.connection.getTestApi()];
|
|
325
|
-
case 6:
|
|
326
|
-
_a.testApi = _b.sent();
|
|
327
|
-
_b.label = 7;
|
|
328
|
-
case 7: return [4 /*yield*/, this.testApi.updateTestRun({ state: 'Completed' }, this.projectName, runId)];
|
|
329
|
-
case 8:
|
|
330
|
-
runUpdatedResponse = _b.sent();
|
|
331
|
-
this._log(chalk_1.default.green("Run ".concat(runId, " - ").concat(runUpdatedResponse.state)));
|
|
332
|
-
return [3 /*break*/, 10];
|
|
333
|
-
case 9:
|
|
334
|
-
error_4 = _b.sent();
|
|
335
|
-
this._warning(chalk_1.default.red("Error on completing run ".concat(error_4)));
|
|
336
|
-
return [3 /*break*/, 10];
|
|
337
|
-
case 10: return [2 /*return*/];
|
|
132
|
+
`${this.environment ? `[${this.environment}]:` : ''} ${options?.testRunTitle || 'Playwright Test Run'}` ||
|
|
133
|
+
`${this.environment ? `[${this.environment}]:` : ''}Test plan ${this.planId}`;
|
|
134
|
+
this.uploadAttachments = options?.uploadAttachments || false;
|
|
135
|
+
this.connection = new azdev.WebApi(this.orgUrl, azdev.getPersonalAccessTokenHandler(this.token), this.azureClientOptions);
|
|
136
|
+
this.testRunConfig = options?.testRunConfig || undefined;
|
|
137
|
+
}
|
|
138
|
+
async onBegin() {
|
|
139
|
+
if (this.isDisabled)
|
|
140
|
+
return;
|
|
141
|
+
try {
|
|
142
|
+
this.testApi = await this.connection.getTestApi();
|
|
143
|
+
const run = await this._createRun(this.testRunTitle);
|
|
144
|
+
if (run?.id) {
|
|
145
|
+
this.resolveRunId(run.id);
|
|
146
|
+
this._log(chalk_1.default.green(`Using run ${run.id} to publish test results`));
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
this.isDisabled = true;
|
|
150
|
+
this.rejectRunId('Failed to create test run. Reporting is disabled.');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
this.isDisabled = true;
|
|
155
|
+
if (error.message.includes('401')) {
|
|
156
|
+
this._warning('Failed to create test run. Check your token. Reporting is disabled.');
|
|
157
|
+
}
|
|
158
|
+
else if (error.message.includes('getaddrinfo ENOTFOUND')) {
|
|
159
|
+
this._warning('Failed to create test run. Check your orgUrl. Reporting is disabled.');
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
this._warning('Failed to create test run. Reporting is disabled.');
|
|
163
|
+
const parsedError = JSON.parse(String(error.message.trim()));
|
|
164
|
+
this._warning(parsedError?.message || error.message);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async onTestEnd(test, testResult) {
|
|
169
|
+
if (this.isDisabled)
|
|
170
|
+
return;
|
|
171
|
+
try {
|
|
172
|
+
const runId = await this.runIdPromise;
|
|
173
|
+
if (!runId)
|
|
174
|
+
return;
|
|
175
|
+
this._logTestItem(test, testResult);
|
|
176
|
+
await this._publishCaseResult(test, testResult);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
this._warning(`Failed to publish test result. \n ${error.message}`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async onEnd() {
|
|
183
|
+
if (this.isDisabled)
|
|
184
|
+
return;
|
|
185
|
+
try {
|
|
186
|
+
const runId = await this.runIdPromise;
|
|
187
|
+
let prevCount = this.resultsToBePublished.length;
|
|
188
|
+
while (this.resultsToBePublished.length > 0) {
|
|
189
|
+
// need wait all results to be published
|
|
190
|
+
if (prevCount > this.resultsToBePublished.length) {
|
|
191
|
+
this._log(chalk_1.default.gray(`Waiting for all results to be published. Remaining ${this.resultsToBePublished.length} results`));
|
|
192
|
+
prevCount--;
|
|
338
193
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
194
|
+
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
195
|
+
}
|
|
196
|
+
if (this.publishedResultsCount === 0 && !runId) {
|
|
197
|
+
this._log(chalk_1.default.gray('No testcases were matched. Ensure that your tests are declared correctly.'));
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (!this.testApi)
|
|
201
|
+
this.testApi = await this.connection.getTestApi();
|
|
202
|
+
const runUpdatedResponse = await this.testApi.updateTestRun({ state: 'Completed' }, this.projectName, runId);
|
|
203
|
+
this._log(chalk_1.default.green(`Run ${runId} - ${runUpdatedResponse.state}`));
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
this._warning(chalk_1.default.red(`Error on completing run ${error}`));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
printsToStdio() {
|
|
343
210
|
return true;
|
|
344
|
-
}
|
|
345
|
-
|
|
211
|
+
}
|
|
212
|
+
_log(message) {
|
|
346
213
|
if (this.logging) {
|
|
347
|
-
console.log(chalk_1.default.magenta(
|
|
214
|
+
console.log(chalk_1.default.magenta(`azure: ${message}`));
|
|
348
215
|
}
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
console.log(
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
216
|
+
}
|
|
217
|
+
_warning(message) {
|
|
218
|
+
console.log(`${chalk_1.default.magenta('azure:')} ${chalk_1.default.yellow(message)}`);
|
|
219
|
+
}
|
|
220
|
+
_getCaseIds(test) {
|
|
221
|
+
const result = [];
|
|
222
|
+
const regex = new RegExp(/\[([\d,\s]+)\]/, 'gm');
|
|
223
|
+
const matchesAll = test.title.matchAll(regex);
|
|
224
|
+
const matches = [...matchesAll].map((match) => match[1]);
|
|
225
|
+
matches.forEach((match) => {
|
|
226
|
+
const ids = match.split(',').map((id) => id.trim());
|
|
227
|
+
result.push(...ids);
|
|
228
|
+
});
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
_logTestItem(test, testResult) {
|
|
359
232
|
switch (testResult.status) {
|
|
360
233
|
case 'passed':
|
|
361
|
-
this._log(chalk_1.default.green(
|
|
234
|
+
this._log(chalk_1.default.green(`${test.title} - ${testResult.status}`));
|
|
362
235
|
break;
|
|
363
236
|
case 'failed':
|
|
364
|
-
this._log(chalk_1.default.red(
|
|
237
|
+
this._log(chalk_1.default.red(`${test.title} - ${testResult.status}`));
|
|
365
238
|
break;
|
|
366
239
|
case 'timedOut':
|
|
367
|
-
this._log(chalk_1.default.yellow(
|
|
240
|
+
this._log(chalk_1.default.yellow(`${test.title} - ${testResult.status}`));
|
|
368
241
|
break;
|
|
369
242
|
case 'skipped':
|
|
370
|
-
this._log(chalk_1.default.yellow(
|
|
243
|
+
this._log(chalk_1.default.yellow(`${test.title} - ${testResult.status}`));
|
|
371
244
|
break;
|
|
372
245
|
case 'interrupted':
|
|
373
|
-
this._log(chalk_1.default.red(
|
|
246
|
+
this._log(chalk_1.default.red(`${test.title} - ${testResult.status}`));
|
|
374
247
|
break;
|
|
375
248
|
default:
|
|
376
|
-
this._log(
|
|
249
|
+
this._log(`${test.title} - ${testResult.status}`);
|
|
377
250
|
break;
|
|
378
251
|
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
case 7:
|
|
414
|
-
error_5 = _b.sent();
|
|
415
|
-
this._warning(chalk_1.default.red(error_5.message));
|
|
416
|
-
this.isDisabled = true;
|
|
417
|
-
return [3 /*break*/, 8];
|
|
418
|
-
case 8: return [2 /*return*/];
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
AzureDevOpsReporter.prototype._removePublished = function (testAlias) {
|
|
424
|
-
var resultIndex = this.resultsToBePublished.indexOf(testAlias);
|
|
252
|
+
}
|
|
253
|
+
async _createRun(runName) {
|
|
254
|
+
try {
|
|
255
|
+
const isExists = await this._checkProject(this.projectName);
|
|
256
|
+
if (!isExists) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
const runModel = {
|
|
261
|
+
name: runName,
|
|
262
|
+
automated: true,
|
|
263
|
+
plan: { id: String(this.planId) },
|
|
264
|
+
...(this.testRunConfig
|
|
265
|
+
? this.testRunConfig
|
|
266
|
+
: {
|
|
267
|
+
configurationIds: [1],
|
|
268
|
+
}),
|
|
269
|
+
};
|
|
270
|
+
if (!this.testApi)
|
|
271
|
+
this.testApi = await this.connection.getTestApi();
|
|
272
|
+
const adTestRun = await this.testApi.createTestRun(runModel, this.projectName);
|
|
273
|
+
if (adTestRun?.id)
|
|
274
|
+
return adTestRun;
|
|
275
|
+
else
|
|
276
|
+
throw new Error('Failed to create test run');
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
this._warning(chalk_1.default.red(error.message));
|
|
281
|
+
this.isDisabled = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
_removePublished(testAlias) {
|
|
285
|
+
const resultIndex = this.resultsToBePublished.indexOf(testAlias);
|
|
425
286
|
if (resultIndex !== -1)
|
|
426
287
|
this.resultsToBePublished.splice(resultIndex, 1);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
288
|
+
}
|
|
289
|
+
async _checkProject(projectName) {
|
|
290
|
+
try {
|
|
291
|
+
if (!this.coreApi)
|
|
292
|
+
this.coreApi = await this.connection.getCoreApi();
|
|
293
|
+
const project = await this.coreApi.getProject(projectName);
|
|
294
|
+
if (project)
|
|
295
|
+
return project;
|
|
296
|
+
else
|
|
297
|
+
throw new Error(`Project ${projectName} does not exist. Reporting is disabled.`);
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
this._warning(chalk_1.default.red(error.message));
|
|
301
|
+
this.isDisabled = true;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
async _getTestPointIdsByTCIds(planId, testcaseIds) {
|
|
305
|
+
const result = {};
|
|
306
|
+
try {
|
|
307
|
+
const pointsQuery = {
|
|
308
|
+
pointsFilter: { testcaseIds },
|
|
309
|
+
};
|
|
310
|
+
if (!this.testApi)
|
|
311
|
+
this.testApi = await this.connection.getTestApi();
|
|
312
|
+
const pointsQueryResult = await this.testApi.getPointsByQuery(pointsQuery, this.projectName);
|
|
313
|
+
if (pointsQueryResult.points) {
|
|
314
|
+
const findedPointWithConfiguration = pointsQueryResult.points.find((point) => point.testPlan &&
|
|
315
|
+
point.testPlan.id &&
|
|
316
|
+
parseInt(point.testPlan.id, 10) === planId &&
|
|
317
|
+
(this.testRunConfig?.configurationIds?.length
|
|
318
|
+
? this.testRunConfig.configurationIds.includes(Number(point.configuration.id))
|
|
319
|
+
: false));
|
|
320
|
+
if (findedPointWithConfiguration) {
|
|
321
|
+
result.point = findedPointWithConfiguration.id;
|
|
322
|
+
result.configurationId = findedPointWithConfiguration.configuration.id;
|
|
323
|
+
result.configurationName = findedPointWithConfiguration.configuration.name;
|
|
455
324
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
result.configurationName = findedPointWithConfiguration.configuration.name;
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
findedPoint = pointsQueryResult.points.find(function (point) { return point.testPlan && point.testPlan.id && parseInt(point.testPlan.id, 10) === planId; });
|
|
499
|
-
if (findedPoint) {
|
|
500
|
-
result.point = findedPoint.id;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
if (!(result === null || result === void 0 ? void 0 : result.point)) {
|
|
505
|
-
throw new Error("Could not find test point for test cases [".concat(testcaseIds.join(','), "] associated with test plan ").concat(this.planId, ". Check, maybe testPlanId, what you specified, is incorrect."));
|
|
506
|
-
}
|
|
507
|
-
return [3 /*break*/, 6];
|
|
508
|
-
case 5:
|
|
509
|
-
error_7 = _b.sent();
|
|
510
|
-
this._warning(chalk_1.default.red(error_7.message));
|
|
511
|
-
return [3 /*break*/, 6];
|
|
512
|
-
case 6: return [2 /*return*/, result];
|
|
325
|
+
else {
|
|
326
|
+
const findedPoint = pointsQueryResult.points.find((point) => point.testPlan && point.testPlan.id && parseInt(point.testPlan.id, 10) === planId);
|
|
327
|
+
if (findedPoint) {
|
|
328
|
+
result.point = findedPoint.id;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (!result?.point) {
|
|
333
|
+
throw new Error(`Could not find test point for test cases [${testcaseIds.join(',')}] associated with test plan ${this.planId}. Check, maybe testPlanId, what you specified, is incorrect.`);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
this._warning(chalk_1.default.red(error.message));
|
|
338
|
+
}
|
|
339
|
+
return result;
|
|
340
|
+
}
|
|
341
|
+
_addReportingOverride = (api) => {
|
|
342
|
+
/**
|
|
343
|
+
* Override the default behavior of publishing test results to the test run.
|
|
344
|
+
* This is necessary because Microsoft Azure API documentation at version higher than '5.0-preview.5'
|
|
345
|
+
* has undocumented fields and they not implementing at 'azure-devops-node-api/TestApi' package.
|
|
346
|
+
* This function is downgraded the API version to '5.0-preview.5'.
|
|
347
|
+
* https://github.com/microsoft/azure-devops-node-api/issues/318#issuecomment-498802402
|
|
348
|
+
*/
|
|
349
|
+
api.addTestResultsToTestRun = function (results, projectName, runId) {
|
|
350
|
+
return new Promise(async (resolve, reject) => {
|
|
351
|
+
const routeValues = {
|
|
352
|
+
project: projectName,
|
|
353
|
+
runId,
|
|
354
|
+
};
|
|
355
|
+
try {
|
|
356
|
+
const verData = await this.vsoClient.getVersioningData('5.0-preview.5', 'Test', '4637d869-3a76-4468-8057-0bb02aa385cf', routeValues);
|
|
357
|
+
const url = verData.requestUrl;
|
|
358
|
+
const options = this.createRequestOptions('application/json', verData.apiVersion);
|
|
359
|
+
const res = await this.rest.create(url, results, options);
|
|
360
|
+
resolve(res);
|
|
361
|
+
}
|
|
362
|
+
catch (error) {
|
|
363
|
+
reject(error);
|
|
513
364
|
}
|
|
514
365
|
});
|
|
515
|
-
}
|
|
366
|
+
};
|
|
367
|
+
return api;
|
|
516
368
|
};
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
runId = _c.sent();
|
|
527
|
-
attachmentsResult = [];
|
|
528
|
-
_i = 0, _a = testResult.attachments;
|
|
529
|
-
_c.label = 2;
|
|
530
|
-
case 2:
|
|
531
|
-
if (!(_i < _a.length)) return [3 /*break*/, 11];
|
|
532
|
-
attachment = _a[_i];
|
|
533
|
-
_c.label = 3;
|
|
534
|
-
case 3:
|
|
535
|
-
_c.trys.push([3, 9, , 10]);
|
|
536
|
-
if (!this.attachmentsType.includes(attachment.name)) return [3 /*break*/, 8];
|
|
537
|
-
if (!(0, fs_1.existsSync)(attachment.path)) return [3 /*break*/, 7];
|
|
538
|
-
attachments = {
|
|
369
|
+
async _uploadAttachmentsFunc(testResult, caseId, testCaseId) {
|
|
370
|
+
this._log(chalk_1.default.gray(`Start upload attachments for test case [${testCaseId}]`));
|
|
371
|
+
const runId = await this.runIdPromise;
|
|
372
|
+
const attachmentsResult = [];
|
|
373
|
+
for (const attachment of testResult.attachments) {
|
|
374
|
+
try {
|
|
375
|
+
if (this.attachmentsType.includes(attachment.name)) {
|
|
376
|
+
if ((0, fs_1.existsSync)(attachment.path)) {
|
|
377
|
+
const attachments = {
|
|
539
378
|
attachmentType: 'GeneralAttachment',
|
|
540
|
-
fileName:
|
|
379
|
+
fileName: `${attachment.name}-${createGuid()}.${attachment.contentType.split('/')[1]}`,
|
|
541
380
|
stream: (0, fs_1.readFileSync)(attachment.path, { encoding: 'base64' }),
|
|
542
381
|
};
|
|
543
|
-
if (
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
_c.label = 5;
|
|
549
|
-
case 5: return [4 /*yield*/, this.testApi.createTestResultAttachment(attachments, this.projectName, runId, caseId)];
|
|
550
|
-
case 6:
|
|
551
|
-
response = _c.sent();
|
|
552
|
-
if (!(response === null || response === void 0 ? void 0 : response.id))
|
|
553
|
-
throw new Error("Failed to upload attachment for test case [".concat(testCaseId, "]"));
|
|
382
|
+
if (!this.testApi)
|
|
383
|
+
this.testApi = await this.connection.getTestApi();
|
|
384
|
+
const response = await this.testApi.createTestResultAttachment(attachments, this.projectName, runId, caseId);
|
|
385
|
+
if (!response?.id)
|
|
386
|
+
throw new Error(`Failed to upload attachment for test case [${testCaseId}]`);
|
|
554
387
|
attachmentsResult.push(response.url);
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
error_8 = _c.sent();
|
|
560
|
-
this._log(chalk_1.default.red(error_8.message));
|
|
561
|
-
return [3 /*break*/, 10];
|
|
562
|
-
case 10:
|
|
563
|
-
_i++;
|
|
564
|
-
return [3 /*break*/, 2];
|
|
565
|
-
case 11: return [2 /*return*/, attachmentsResult];
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
throw new Error(`Attachment ${attachment.path} does not exist`);
|
|
391
|
+
}
|
|
566
392
|
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
return
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
this._log(chalk_1.default.gray("Start publishing: ".concat(test.title)));
|
|
589
|
-
return [4 /*yield*/, this._getTestPointIdsByTCIds(this.planId, [parseInt(caseId, 10)])];
|
|
590
|
-
case 3:
|
|
591
|
-
points = _f.sent();
|
|
592
|
-
if (!points.point) {
|
|
593
|
-
this._removePublished(testAlias);
|
|
594
|
-
throw new Error("No test points found for test case [".concat(caseId, "]"));
|
|
595
|
-
}
|
|
596
|
-
results = [
|
|
597
|
-
__assign({ testCase: { id: caseId }, testPoint: { id: String(points.point) }, testCaseTitle: test.title, outcome: AzureTestStatuses[testResult.status], state: 'Completed', durationInMs: testResult.duration, errorMessage: testResult.error
|
|
598
|
-
? "".concat(test.title, ": ").concat((_b = (_a = testResult.error) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.replace(/\u001b\[.*?m/g, ''))
|
|
599
|
-
: undefined, stackTrace: (_d = (_c = testResult.error) === null || _c === void 0 ? void 0 : _c.stack) === null || _d === void 0 ? void 0 : _d.replace(/\u001b\[.*?m/g, '') }, (points.configurationId && {
|
|
600
|
-
configuration: { id: points.configurationId, name: points.configurationName },
|
|
601
|
-
})),
|
|
602
|
-
];
|
|
603
|
-
if (!!this.testApi) return [3 /*break*/, 5];
|
|
604
|
-
_e = this;
|
|
605
|
-
return [4 /*yield*/, this.connection.getTestApi()];
|
|
606
|
-
case 4:
|
|
607
|
-
_e.testApi = _f.sent();
|
|
608
|
-
_f.label = 5;
|
|
609
|
-
case 5: return [4 /*yield*/, this._addReportingOverride(this.testApi).addTestResultsToTestRun(results, this.projectName, runId)];
|
|
610
|
-
case 6:
|
|
611
|
-
testCaseResult = (_f.sent());
|
|
612
|
-
if (!(testCaseResult === null || testCaseResult === void 0 ? void 0 : testCaseResult.result))
|
|
613
|
-
throw new Error("Failed to publish test result for test case [".concat(caseId, "]"));
|
|
614
|
-
if (!(this.uploadAttachments && testResult.attachments.length > 0)) return [3 /*break*/, 8];
|
|
615
|
-
return [4 /*yield*/, this._uploadAttachmentsFunc(testResult, testCaseResult.result.value[0].id, caseId)];
|
|
616
|
-
case 7:
|
|
617
|
-
_f.sent();
|
|
618
|
-
_f.label = 8;
|
|
619
|
-
case 8:
|
|
620
|
-
this._removePublished(testAlias);
|
|
621
|
-
this.publishedResultsCount++;
|
|
622
|
-
this._log(chalk_1.default.gray("Result published: ".concat(test.title)));
|
|
623
|
-
return [2 /*return*/, testCaseResult];
|
|
624
|
-
case 9:
|
|
625
|
-
error_9 = _f.sent();
|
|
626
|
-
this._removePublished(testAlias);
|
|
627
|
-
this._warning(chalk_1.default.red(error_9.message));
|
|
628
|
-
return [3 /*break*/, 10];
|
|
629
|
-
case 10: return [2 /*return*/];
|
|
393
|
+
}
|
|
394
|
+
catch (error) {
|
|
395
|
+
this._log(chalk_1.default.red(error.message));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return attachmentsResult;
|
|
399
|
+
}
|
|
400
|
+
async _publishCaseResult(test, testResult) {
|
|
401
|
+
const caseIds = this._getCaseIds(test);
|
|
402
|
+
if (!caseIds || !caseIds.length)
|
|
403
|
+
return;
|
|
404
|
+
await Promise.all(caseIds.map(async (caseId) => {
|
|
405
|
+
const testAlias = `${shortID()} - ${test.title}`;
|
|
406
|
+
this.resultsToBePublished.push(testAlias);
|
|
407
|
+
try {
|
|
408
|
+
const runId = await this.runIdPromise;
|
|
409
|
+
this._log(chalk_1.default.gray(`Start publishing: TC:${caseId} - ${test.title}`));
|
|
410
|
+
const points = await this._getTestPointIdsByTCIds(this.planId, [parseInt(caseId, 10)]);
|
|
411
|
+
if (!points.point) {
|
|
412
|
+
this._removePublished(testAlias);
|
|
413
|
+
throw new Error(`No test points found for test case [${caseIds}]`);
|
|
630
414
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
415
|
+
const results = [
|
|
416
|
+
{
|
|
417
|
+
testCase: { id: caseId },
|
|
418
|
+
testPoint: { id: String(points.point) },
|
|
419
|
+
testCaseTitle: test.title,
|
|
420
|
+
outcome: AzureTestStatuses[testResult.status],
|
|
421
|
+
state: 'Completed',
|
|
422
|
+
durationInMs: testResult.duration,
|
|
423
|
+
errorMessage: testResult.error
|
|
424
|
+
? `${test.title}: ${testResult.error?.message?.replace(/\u001b\[.*?m/g, '')}`
|
|
425
|
+
: undefined,
|
|
426
|
+
stackTrace: testResult.error?.stack?.replace(/\u001b\[.*?m/g, ''),
|
|
427
|
+
...(points.configurationId && {
|
|
428
|
+
configuration: { id: points.configurationId, name: points.configurationName },
|
|
429
|
+
}),
|
|
430
|
+
},
|
|
431
|
+
];
|
|
432
|
+
if (!this.testApi)
|
|
433
|
+
this.testApi = await this.connection.getTestApi();
|
|
434
|
+
const testCaseResult = (await this._addReportingOverride(this.testApi).addTestResultsToTestRun(results, this.projectName, runId));
|
|
435
|
+
if (!testCaseResult?.result)
|
|
436
|
+
throw new Error(`Failed to publish test result for test case [${caseId}]`);
|
|
437
|
+
if (this.uploadAttachments && testResult.attachments.length > 0)
|
|
438
|
+
await this._uploadAttachmentsFunc(testResult, testCaseResult.result.value[0].id, caseId);
|
|
439
|
+
this._removePublished(testAlias);
|
|
440
|
+
this.publishedResultsCount++;
|
|
441
|
+
this._log(chalk_1.default.gray(`Result published: TC:${caseId} - ${test.title}`));
|
|
442
|
+
return testCaseResult;
|
|
443
|
+
}
|
|
444
|
+
catch (error) {
|
|
445
|
+
this._removePublished(testAlias);
|
|
446
|
+
this._warning(chalk_1.default.red(error.message));
|
|
447
|
+
}
|
|
448
|
+
}));
|
|
449
|
+
}
|
|
450
|
+
}
|
|
636
451
|
exports.default = AzureDevOpsReporter;
|
|
637
452
|
//# sourceMappingURL=playwright-azure-reporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-azure-reporter.js","sourceRoot":"","sources":["../src/playwright-azure-reporter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAK,CAAC,GAAG,CAAC,OAAK,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;KAE3C;IACH,0BAAC;AAAD,CAAC,AAvZD,IAuZC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"playwright-azure-reporter.js","sourceRoot":"","sources":["../src/playwright-azure-reporter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAmC;AACnC,qCAAqC;AACrC,6DAA+C;AAU/C,kDAA0B;AAC1B,oDAA4B;AAC5B,2BAA8C;AAG9C,SAAgB,UAAU;IACxB,OAAO,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AAED,SAAgB,OAAO;IACrB,OAAO,gBAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC;AAFD,0BAEC;AAED,IAAK,iBAMJ;AAND,WAAK,iBAAiB;IACpB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,uCAAkB,CAAA;IAClB,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;AACxB,CAAC,EANI,iBAAiB,KAAjB,iBAAiB,QAMrB;AAED,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAuEvE,MAAM,mBAAmB;IACf,OAAO,CAAiB;IACxB,OAAO,CAAY;IACnB,qBAAqB,GAAG,CAAC,CAAC;IAC1B,oBAAoB,GAAa,EAAE,CAAC;IACpC,UAAU,CAAU;IACpB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,MAAM,GAAG,CAAC,CAAC;IACX,OAAO,GAAG,KAAK,CAAC;IAChB,UAAU,GAAG,KAAK,CAAC;IACnB,YAAY,GAAG,EAAE,CAAC;IAClB,iBAAiB,GAAG,KAAK,CAAC;IAC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jC,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,wBAAwB,MAAM,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACxE,OAAO,cAAc,CAAC;aACvB;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;gBACjC,IAAI,CAAC,QAAQ,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
package/tests/example.spec.ts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
|
-
import { expect, test } from '@playwright/test'
|
|
1
|
+
import { expect, test } from '@playwright/test';
|
|
2
2
|
|
|
3
3
|
test.beforeEach(async ({ page }) => {
|
|
4
|
-
await page.goto('https://playwright.dev/')
|
|
5
|
-
})
|
|
4
|
+
await page.goto('https://playwright.dev/');
|
|
5
|
+
});
|
|
6
6
|
|
|
7
7
|
test.describe('Describe', () => {
|
|
8
8
|
test('[3] Should page opened', async ({ page }) => {
|
|
9
|
-
await page.locator('text=Get started').click()
|
|
10
|
-
await expect(page).toHaveTitle(/Getting started/)
|
|
11
|
-
})
|
|
9
|
+
await page.locator('text=Get started').click();
|
|
10
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
11
|
+
});
|
|
12
12
|
test('[7] Should page closed', async ({ page }) => {
|
|
13
|
-
await page.locator('text=Get started').click()
|
|
14
|
-
await expect(page).toHaveTitle(/Getting started/)
|
|
15
|
-
})
|
|
13
|
+
await page.locator('text=Get started').click();
|
|
14
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
15
|
+
});
|
|
16
16
|
test('[8] Awaiting for user input', async ({ page }) => {
|
|
17
|
-
await page.locator('text=Get started').click()
|
|
18
|
-
await expect(page).toHaveTitle(/Getting started/)
|
|
19
|
-
})
|
|
20
|
-
})
|
|
17
|
+
await page.locator('text=Get started').click();
|
|
18
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
19
|
+
});
|
|
20
|
+
test('[3] [7] [8] Awaiting for user input', async ({ page }) => {
|
|
21
|
+
await page.locator('text=Get started').click();
|
|
22
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
23
|
+
});
|
|
24
|
+
test('[3,7,8] Awaiting for user input', async ({ page }) => {
|
|
25
|
+
await page.locator('text=Get started').click();
|
|
26
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
27
|
+
});
|
|
28
|
+
test('[3, 7, 8] Awaiting for user input', async ({ page }) => {
|
|
29
|
+
await page.locator('text=Get started').click();
|
|
30
|
+
await expect(page).toHaveTitle(/Getting started/);
|
|
31
|
+
});
|
|
32
|
+
});
|
package/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Basic Options */
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
5
5
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
6
6
|
"lib": ["es2020", "dom"], /* Specify library files to be included in the compilation. */
|
|
7
7
|
"declaration": true, /* Generates corresponding '.d.ts' file. */
|