cucumberjs-qase-reporter 0.2.8-alpha.1 → 2.0.0-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/README.md +38 -53
- package/package.json +36 -45
- package/tsconfig.build.json +9 -0
- package/dist/index.d.ts +0 -36
- package/dist/index.js +0 -447
- package/dist/index.js.map +0 -1
- package/examples/examples/phantom/support/cucumber_documentation.js +0 -23
- package/examples/examples/phantom/support/hooks.js +0 -9
- package/examples/examples/phantom/support/world.js +0 -91
- package/examples/examples/zombie/logo.svg +0 -4
- package/examples/examples/zombie/steps/cucumber_documentation.js +0 -34
- package/examples/examples/zombie/support/hooks.js +0 -26
- package/examples/examples/zombie/support/world.js +0 -16
- package/examples/features/cucumber_documentation.feature +0 -11
- package/examples/features/cucumber_documentation2.feature +0 -23
- package/examples/package-lock.json +0 -25435
- package/examples/package.json +0 -17
- package/test/plugin.test.ts +0 -9
- /package/{examples/screenshots → screenshots}/demo.gif +0 -0
- /package/{examples/screenshots → screenshots}/screenshot.png +0 -0
package/dist/index.js
DELETED
|
@@ -1,447 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
/* eslint-disable camelcase */
|
|
6
|
-
/* eslint-disable max-len */
|
|
7
|
-
/* eslint-disable no-console,no-underscore-dangle,@typescript-eslint/no-non-null-assertion */
|
|
8
|
-
const src_1 = require("qaseio/dist/src");
|
|
9
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
10
|
-
const cucumber_1 = require("@cucumber/cucumber");
|
|
11
|
-
const qaseio_1 = require("qaseio");
|
|
12
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
13
|
-
const crypto_1 = __importDefault(require("crypto"));
|
|
14
|
-
const child_process_1 = require("child_process");
|
|
15
|
-
const fs_1 = __importDefault(require("fs"));
|
|
16
|
-
const messages_1 = require("@cucumber/messages/dist/src/messages");
|
|
17
|
-
const mime_types_1 = __importDefault(require("mime-types"));
|
|
18
|
-
const moment_1 = __importDefault(require("moment"));
|
|
19
|
-
const os_1 = __importDefault(require("os"));
|
|
20
|
-
const path_1 = __importDefault(require("path"));
|
|
21
|
-
var Status = messages_1.io.cucumber.messages.TestStepFinished.TestStepResult.Status;
|
|
22
|
-
const StatusMapping = {
|
|
23
|
-
[Status.PASSED]: src_1.ResultCreateStatusEnum.PASSED,
|
|
24
|
-
[Status.FAILED]: src_1.ResultCreateStatusEnum.FAILED,
|
|
25
|
-
[Status.SKIPPED]: src_1.ResultCreateStatusEnum.SKIPPED,
|
|
26
|
-
[Status.AMBIGUOUS]: null,
|
|
27
|
-
[Status.PENDING]: null,
|
|
28
|
-
[Status.UNDEFINED]: null,
|
|
29
|
-
[Status.UNKNOWN]: null,
|
|
30
|
-
};
|
|
31
|
-
let customBoundary = '----------------------------';
|
|
32
|
-
crypto_1.default.randomBytes(24).forEach((value) => {
|
|
33
|
-
customBoundary += Math.floor(value * 10).toString(16);
|
|
34
|
-
});
|
|
35
|
-
class CustomBoundaryFormData extends form_data_1.default {
|
|
36
|
-
constructor() {
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
38
|
-
super();
|
|
39
|
-
}
|
|
40
|
-
getBoundary() {
|
|
41
|
-
return customBoundary;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const loadJSON = (file) => {
|
|
45
|
-
try {
|
|
46
|
-
const data = fs_1.default.readFileSync(file, { encoding: 'utf8' });
|
|
47
|
-
if (data) {
|
|
48
|
-
return JSON.parse(data);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
// Ignore error when file does not exist or it's malformed
|
|
53
|
-
}
|
|
54
|
-
return undefined;
|
|
55
|
-
};
|
|
56
|
-
const prepareConfig = (options = {}, configFile = '.qaserc') => {
|
|
57
|
-
const loaded = loadJSON(path_1.default.join(process.cwd(), configFile || '.qaserc'));
|
|
58
|
-
if (!loaded) {
|
|
59
|
-
// eslint-disable-next-line no-throw-literal
|
|
60
|
-
console.log(chalk_1.default `{bold {blue qase:}} {red Missing .qaserc file}`);
|
|
61
|
-
}
|
|
62
|
-
const config = Object.assign(loaded || {}, options);
|
|
63
|
-
return {
|
|
64
|
-
enabled: process.env.QASE_ENABLED === 'true' || config.enabled || false,
|
|
65
|
-
basePath: process.env.QASE_API_BASE_URL || config.basePath,
|
|
66
|
-
apiToken: process.env.QASE_API_TOKEN || config.apiToken || '',
|
|
67
|
-
rootSuiteTitle: process.env.QASE_ROOT_SUITE_TITLE || config.rootSuiteTitle,
|
|
68
|
-
environmentId: Number.parseInt(process.env.QASE_ENVIRONMENT_ID, 10) || config.environmentId,
|
|
69
|
-
projectCode: process.env.QASE_PROJECT || config.projectCode || '',
|
|
70
|
-
runId: process.env.QASE_RUN_ID || config.runId || '',
|
|
71
|
-
runName: process.env.QASE_RUN_NAME || config.runName || 'Automated Run %DATE%',
|
|
72
|
-
runDescription: process.env.QASE_RUN_DESCRIPTION || config.runDescription,
|
|
73
|
-
logging: process.env.QASE_LOGGING !== '' || config.logging,
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
const prepareReportName = (config) => {
|
|
77
|
-
const date = moment_1.default().format();
|
|
78
|
-
return config.runName
|
|
79
|
-
.replace('%DATE%', date);
|
|
80
|
-
};
|
|
81
|
-
const verifyConfig = (config) => {
|
|
82
|
-
const { enabled, apiToken, projectCode } = config;
|
|
83
|
-
if (enabled) {
|
|
84
|
-
if (!projectCode) {
|
|
85
|
-
console.log(chalk_1.default `{bold {blue qase:}} {red Project Code should be provided}`);
|
|
86
|
-
}
|
|
87
|
-
if (apiToken && projectCode) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
};
|
|
93
|
-
class QaseReporter extends cucumber_1.Formatter {
|
|
94
|
-
constructor(options) {
|
|
95
|
-
var _a;
|
|
96
|
-
super(options);
|
|
97
|
-
this.pickleInfo = {};
|
|
98
|
-
this.testCaseStarts = {};
|
|
99
|
-
this.testCaseStartedResult = {};
|
|
100
|
-
this.testCaseStartedAttachment = {};
|
|
101
|
-
this.testCaseStartedErrors = {};
|
|
102
|
-
this.testCaseScenarioId = {};
|
|
103
|
-
this.pending = [];
|
|
104
|
-
this.results = {};
|
|
105
|
-
this.scenarios = {};
|
|
106
|
-
this.uploadsInQueueCount = 0;
|
|
107
|
-
this.config = prepareConfig(options.parsedArgvOptions, (_a = options.parsedArgvOptions) === null || _a === void 0 ? void 0 : _a.qaseConfig);
|
|
108
|
-
this.enabled = verifyConfig(this.config);
|
|
109
|
-
this.api = new qaseio_1.QaseApi(this.config.apiToken, this.config.basePath, this.createHeaders(), CustomBoundaryFormData);
|
|
110
|
-
if (!this.enabled) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
this.config.runName = prepareReportName(this.config);
|
|
114
|
-
options.eventBroadcaster
|
|
115
|
-
.on('envelope', (envelope) => {
|
|
116
|
-
var _a, _b, _c, _d;
|
|
117
|
-
if (envelope.gherkinDocument) {
|
|
118
|
-
(_b = (_a = envelope.gherkinDocument.feature) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.forEach((featureChild) => {
|
|
119
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
120
|
-
if (((_b = (_a = envelope.gherkinDocument) === null || _a === void 0 ? void 0 : _a.feature) === null || _b === void 0 ? void 0 : _b.name) != null && ((_c = featureChild.scenario) === null || _c === void 0 ? void 0 : _c.id) !== undefined && ((_d = featureChild.scenario) === null || _d === void 0 ? void 0 : _d.id) !== null) {
|
|
121
|
-
this.scenarios[(_e = featureChild.scenario) === null || _e === void 0 ? void 0 : _e.id] = (_g = (_f = envelope.gherkinDocument) === null || _f === void 0 ? void 0 : _f.feature) === null || _g === void 0 ? void 0 : _g.name;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
else if (envelope.pickle) {
|
|
126
|
-
this.pickleInfo[envelope.pickle.id] = {
|
|
127
|
-
caseIds: this.extractIds(envelope.pickle.tags),
|
|
128
|
-
name: envelope.pickle.name,
|
|
129
|
-
lastAstNodeId: envelope.pickle.astNodeIds ? envelope.pickle.astNodeIds[envelope.pickle.astNodeIds.length - 1] : null,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
else if (envelope.attachment) {
|
|
133
|
-
void this.upload(envelope.attachment);
|
|
134
|
-
}
|
|
135
|
-
else if (envelope.testRunStarted) {
|
|
136
|
-
void this.checkProject(this.config.projectCode, async (prjExists) => {
|
|
137
|
-
if (prjExists) {
|
|
138
|
-
this._log(chalk_1.default `{green Project ${this.config.projectCode} exists}`);
|
|
139
|
-
const willRun = Object.keys(this.pickleInfo).length !== 0;
|
|
140
|
-
if (this.config.runId && willRun) {
|
|
141
|
-
this.saveRunId(this.config.runId);
|
|
142
|
-
return this.checkRun(this.config.runId, (runExists) => {
|
|
143
|
-
const run = this.config.runId;
|
|
144
|
-
if (runExists) {
|
|
145
|
-
this._log(chalk_1.default `{green Using run ${run} to publish test results}`);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
this._log(chalk_1.default `{red Run ${run} does not exist}`);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
else if (!this.config.runId && willRun) {
|
|
153
|
-
return this.createRun(this.config.runName, this.config.runDescription, (created) => {
|
|
154
|
-
var _a;
|
|
155
|
-
if (created) {
|
|
156
|
-
this.saveRunId((_a = created.result) === null || _a === void 0 ? void 0 : _a.id);
|
|
157
|
-
this._log(chalk_1.default `{green Using run ${this.config.runId} to publish test results}`);
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
this._log(chalk_1.default `{red Could not create run in project ${this.config.projectCode}}`);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
else if (!willRun) {
|
|
165
|
-
this._log(chalk_1.default `{red No cases would be executed}`);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
this._log(chalk_1.default `{red Project ${this.config.projectCode} does not exist}`);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
else if (envelope.testRunFinished) {
|
|
174
|
-
if (Object.keys(this.results).length === 0) {
|
|
175
|
-
this._log('No testcases were matched. Ensure that your tests are declared correctly.');
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
void this.publishResults();
|
|
179
|
-
}
|
|
180
|
-
else if (envelope.testCase) {
|
|
181
|
-
this.testCaseScenarioId[envelope.testCase.id] = envelope.testCase.pickleId;
|
|
182
|
-
}
|
|
183
|
-
else if (envelope.testCaseStarted) {
|
|
184
|
-
this.testCaseStarts[envelope.testCaseStarted.id] = envelope.testCaseStarted;
|
|
185
|
-
this.testCaseStartedResult[envelope.testCaseStarted.id] = src_1.ResultCreateStatusEnum.PASSED;
|
|
186
|
-
}
|
|
187
|
-
else if (envelope.testStepFinished) {
|
|
188
|
-
const stepFin = envelope.testStepFinished;
|
|
189
|
-
const stepStatus = stepFin.testStepResult.status;
|
|
190
|
-
const stepMessage = stepFin.testStepResult.message;
|
|
191
|
-
const oldStatus = this.testCaseStartedResult[stepFin.testCaseStartedId];
|
|
192
|
-
const newStatus = StatusMapping[stepFin.testStepResult.status];
|
|
193
|
-
if (newStatus === null) {
|
|
194
|
-
this._log(chalk_1.default `{redBright Unexpected finish status ${stepStatus} received for step ${stepMessage}}`);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (newStatus !== src_1.ResultCreateStatusEnum.PASSED) {
|
|
198
|
-
this.addErrorMessage(stepFin.testCaseStartedId, (_c = stepFin.testStepResult) === null || _c === void 0 ? void 0 : _c.message);
|
|
199
|
-
if (oldStatus) {
|
|
200
|
-
if (oldStatus !== src_1.ResultCreateStatusEnum.FAILED && newStatus) {
|
|
201
|
-
this.testCaseStartedResult[stepFin.testCaseStartedId] = newStatus;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
if (newStatus) {
|
|
206
|
-
this.testCaseStartedResult[stepFin.testCaseStartedId] = newStatus;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
else if (envelope.testCaseFinished) {
|
|
212
|
-
const tcs = this.testCaseStarts[envelope.testCaseFinished.testCaseStartedId];
|
|
213
|
-
const pickleId = this.testCaseScenarioId[tcs.testCaseId];
|
|
214
|
-
const info = this.pickleInfo[pickleId];
|
|
215
|
-
const status = this.testCaseStartedResult[envelope.testCaseFinished.testCaseStartedId];
|
|
216
|
-
const test = {
|
|
217
|
-
name: info.name,
|
|
218
|
-
started: tcs,
|
|
219
|
-
finished: envelope.testCaseFinished,
|
|
220
|
-
caseIds: info.caseIds,
|
|
221
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
222
|
-
duration: Math.abs((envelope.testCaseFinished.timestamp.seconds - tcs.timestamp.seconds)),
|
|
223
|
-
error: (_d = this.testCaseStartedErrors[tcs.id]) === null || _d === void 0 ? void 0 : _d.join('\n\n'),
|
|
224
|
-
lastAstNodeId: info.lastAstNodeId,
|
|
225
|
-
};
|
|
226
|
-
this.addForSending(test, status);
|
|
227
|
-
}
|
|
228
|
-
else if (envelope.parseError) {
|
|
229
|
-
console.log('Error:', envelope.parseError);
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
async waitUploads() {
|
|
234
|
-
while (this.uploadsInQueueCount > 0) {
|
|
235
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
async upload(attachment) {
|
|
239
|
-
const randomString = crypto_1.default.randomBytes(20).toString('hex');
|
|
240
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
|
|
241
|
-
const tmpFilePath = os_1.default.tmpdir().concat(randomString, '.', mime_types_1.default.extension(attachment.mediaType));
|
|
242
|
-
fs_1.default.writeFile(tmpFilePath, attachment.body, 'base64', (err) => {
|
|
243
|
-
if (err !== null) {
|
|
244
|
-
this._log(err.message);
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
this.uploadsInQueueCount++;
|
|
248
|
-
await this.api.attachments.uploadAttachment(this.config.projectCode, [fs_1.default.createReadStream(tmpFilePath)], {
|
|
249
|
-
headers: {
|
|
250
|
-
'Content-Type': 'multipart/form-data; boundary=' + customBoundary,
|
|
251
|
-
},
|
|
252
|
-
}).then((response) => {
|
|
253
|
-
var _a;
|
|
254
|
-
const fileHash = (_a = response.data.result) === null || _a === void 0 ? void 0 : _a[0].hash;
|
|
255
|
-
const caseAttachments = this.testCaseStartedAttachment[attachment.testCaseStartedId] || [];
|
|
256
|
-
caseAttachments.push(fileHash);
|
|
257
|
-
this.testCaseStartedAttachment[attachment.testCaseStartedId] = caseAttachments;
|
|
258
|
-
this.uploadsInQueueCount--;
|
|
259
|
-
}).catch((err) => {
|
|
260
|
-
this.log(`Error on uploading file ${err}`);
|
|
261
|
-
this.uploadsInQueueCount--;
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
async publishResults() {
|
|
265
|
-
await this.waitUploads();
|
|
266
|
-
const res = [];
|
|
267
|
-
Object.keys(this.results).forEach((testCaseStartedId) => {
|
|
268
|
-
var _a;
|
|
269
|
-
const result = this.results[testCaseStartedId];
|
|
270
|
-
result.attachments = (_a = this.testCaseStartedAttachment[testCaseStartedId]) !== null && _a !== void 0 ? _a : [];
|
|
271
|
-
res.push(result);
|
|
272
|
-
});
|
|
273
|
-
this.api.results.createResultBulk(this.config.projectCode, Number(this.config.runId), {
|
|
274
|
-
results: res,
|
|
275
|
-
}).then(() => {
|
|
276
|
-
this._log(chalk_1.default `{gray Results sent}`);
|
|
277
|
-
}).catch((err) => {
|
|
278
|
-
this._log(err);
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
addErrorMessage(tcsid, error) {
|
|
282
|
-
if (error) {
|
|
283
|
-
if (tcsid in this.testCaseStartedErrors) {
|
|
284
|
-
this.testCaseStartedErrors[tcsid].push(error);
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
this.testCaseStartedErrors[tcsid] = [error];
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
_log(message, ...optionalParams) {
|
|
292
|
-
if (this.config.logging) {
|
|
293
|
-
console.log(chalk_1.default `{bold {blue qase:}} ${message}`, ...optionalParams);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
async checkProject(projectCode, cb) {
|
|
297
|
-
var _a;
|
|
298
|
-
try {
|
|
299
|
-
const resp = await this.api.projects.getProject(projectCode);
|
|
300
|
-
await cb(Boolean((_a = resp.data.result) === null || _a === void 0 ? void 0 : _a.code));
|
|
301
|
-
}
|
|
302
|
-
catch (err) {
|
|
303
|
-
this._log(err);
|
|
304
|
-
this.enabled = false;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
async createRun(name, description, cb) {
|
|
308
|
-
try {
|
|
309
|
-
const runObject = this.createRunObject(name || `Automated run ${new Date().toISOString()}`, [], {
|
|
310
|
-
description: description || 'CucumberJS automated run',
|
|
311
|
-
environment_id: this.config.environmentId,
|
|
312
|
-
is_autotest: true,
|
|
313
|
-
});
|
|
314
|
-
const res = await this.api.runs.createRun(this.config.projectCode, runObject);
|
|
315
|
-
cb(res.data);
|
|
316
|
-
}
|
|
317
|
-
catch (err) {
|
|
318
|
-
this._log(`Error on creating run ${err}`);
|
|
319
|
-
this.enabled = false;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
createRunObject(name, cases, args) {
|
|
323
|
-
return Object.assign({ title: name, cases }, args);
|
|
324
|
-
}
|
|
325
|
-
async checkRun(runId, cb) {
|
|
326
|
-
if (runId === undefined) {
|
|
327
|
-
cb(false);
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
return this.api.runs.getRun(this.config.projectCode, Number(runId))
|
|
331
|
-
.then((resp) => {
|
|
332
|
-
var _a, _b;
|
|
333
|
-
this._log(`Get run result on checking run ${(_a = resp.data.result) === null || _a === void 0 ? void 0 : _a.id}`);
|
|
334
|
-
cb(Boolean((_b = resp.data.result) === null || _b === void 0 ? void 0 : _b.id));
|
|
335
|
-
})
|
|
336
|
-
.catch((err) => {
|
|
337
|
-
this._log(`Error on checking run ${err}`);
|
|
338
|
-
this.enabled = false;
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
saveRunId(runId) {
|
|
342
|
-
this.config.runId = runId;
|
|
343
|
-
if (this.config.runId) {
|
|
344
|
-
while (this.pending.length) {
|
|
345
|
-
this._log(`Number of pending: ${this.pending.length}`);
|
|
346
|
-
const cb = this.pending.shift();
|
|
347
|
-
if (cb) {
|
|
348
|
-
cb(this.config.runId);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
logTestItem(name, status) {
|
|
354
|
-
const map = {
|
|
355
|
-
failed: chalk_1.default `{red Test ${name} ${status}}`,
|
|
356
|
-
passed: chalk_1.default `{green Test ${name} ${status}}`,
|
|
357
|
-
pending: chalk_1.default `{blueBright Test ${name} ${status}}`,
|
|
358
|
-
skipped: chalk_1.default `{bgGray Test ${name} ${status}}`,
|
|
359
|
-
};
|
|
360
|
-
if (status) {
|
|
361
|
-
this._log(map[status]);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
addForSending(test, status) {
|
|
365
|
-
this.logTestItem(test.name, status);
|
|
366
|
-
if (test.caseIds.length) {
|
|
367
|
-
this.addKnownCasesForSending(test, status);
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
this.addNewCasesForSending(test, status);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
addKnownCasesForSending(test, status) {
|
|
374
|
-
test.caseIds.forEach((caseId) => {
|
|
375
|
-
if (!caseId) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
const add = test.caseIds.length > 1 ? chalk_1.default ` {white For case ${caseId}}` : '';
|
|
379
|
-
this._log(chalk_1.default `{gray Added for publishing: ${test.name}}${add}`);
|
|
380
|
-
this.results[test.finished.testCaseStartedId] = {
|
|
381
|
-
status,
|
|
382
|
-
case_id: parseInt(caseId, 10),
|
|
383
|
-
time: test.duration,
|
|
384
|
-
stacktrace: test.error,
|
|
385
|
-
comment: test.error ? test.error.split('\n')[0] : undefined,
|
|
386
|
-
};
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
addNewCasesForSending(test, status) {
|
|
390
|
-
const suiteTitle = [test.lastAstNodeId ? this.scenarios[test.lastAstNodeId] : ''];
|
|
391
|
-
if (this.config.rootSuiteTitle) {
|
|
392
|
-
suiteTitle.unshift(this.config.rootSuiteTitle);
|
|
393
|
-
}
|
|
394
|
-
this._log(chalk_1.default `{gray Added for publishing: ${suiteTitle.join('/')}/${test.name}}`);
|
|
395
|
-
this.results[test.finished.testCaseStartedId] = {
|
|
396
|
-
case: {
|
|
397
|
-
title: test.name,
|
|
398
|
-
suite_title: suiteTitle.join('\t'),
|
|
399
|
-
},
|
|
400
|
-
status,
|
|
401
|
-
time: test.duration,
|
|
402
|
-
stacktrace: test.error,
|
|
403
|
-
comment: test.error ? test.error.split('\n')[0] : undefined,
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
extractIds(tagsList) {
|
|
407
|
-
const regex = /[Qq]-*(\d+)/;
|
|
408
|
-
return tagsList.filter((tagInfo) => regex.test(tagInfo.name)).map((tagInfo) => regex.exec(tagInfo.name)[1]);
|
|
409
|
-
}
|
|
410
|
-
createHeaders() {
|
|
411
|
-
const { version: nodeVersion } = process;
|
|
412
|
-
const npmVersion = child_process_1.execSync('npm -v', { encoding: 'utf8' }).replace(/['"\n]+/g, '');
|
|
413
|
-
const qaseapiVersion = this.getPackageVersion('qaseio');
|
|
414
|
-
const frameworkVersion = this.getPackageVersion('@cucumber/cucumber');
|
|
415
|
-
const reporterVersion = this.getPackageVersion('cucumberjs-qase-reporter');
|
|
416
|
-
const xPlatformHeader = `node=${nodeVersion};npm=${npmVersion};os=${os_1.default.platform()};arch=${os_1.default.arch()}`;
|
|
417
|
-
const xClientHeader = `cucumberjs=${frameworkVersion};qase-cucumberjs=${reporterVersion};qaseapi=${qaseapiVersion}`;
|
|
418
|
-
return {
|
|
419
|
-
'X-Client': xClientHeader,
|
|
420
|
-
'X-Platform': xPlatformHeader,
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
getPackageVersion(name) {
|
|
424
|
-
const UNDEFINED = 'undefined';
|
|
425
|
-
try {
|
|
426
|
-
const pathToPackageJson = require.resolve(`${name}/package.json`, { paths: [process.cwd()] });
|
|
427
|
-
if (pathToPackageJson) {
|
|
428
|
-
try {
|
|
429
|
-
const packageString = fs_1.default.readFileSync(pathToPackageJson, { encoding: 'utf8' });
|
|
430
|
-
if (packageString) {
|
|
431
|
-
const packageObject = JSON.parse(packageString);
|
|
432
|
-
return packageObject.version;
|
|
433
|
-
}
|
|
434
|
-
return UNDEFINED;
|
|
435
|
-
}
|
|
436
|
-
catch (error) {
|
|
437
|
-
return UNDEFINED;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
catch (error) {
|
|
442
|
-
return UNDEFINED;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
module.exports = QaseReporter;
|
|
447
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,8BAA8B;AAC9B,4BAA4B;AAC5B,6FAA6F;AAC7F,yCAAiF;AACjF,0DAAiC;AACjC,iDAA6C;AAE7C,mCAA+B;AAC/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AAY,cAAwB,EAAE,CAAC;QAElJ,OAAO;YACH,UAAU,EAAE,aAAa;YACzB,YAAY,EAAE,eAAe;SAChC,CAAC;IACN,CAAC;IAEO,iBAAiB,CAAC,IAAY;QAClC,MAAM,SAAS,GAAG,WAAW,CAAC;QAC9B,IAAI;YACA,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9F,IAAI,iBAAiB,EAAE;gBACnB,IAAI;oBACA,MAAM,aAAa,GAAG,YAAE,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;oBAC/E,IAAI,aAAa,EAAE;wBACf,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAwB,CAAC;wBACvE,OAAO,aAAa,CAAC,OAAO,CAAC;qBAChC;oBACD,OAAO,SAAS,CAAC;iBACpB;gBAAC,OAAO,KAAK,EAAE;oBACZ,OAAO,SAAS,CAAC;iBACpB;aACJ;SACJ;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,SAAS,CAAC;SACpB;IACL,CAAC;CACJ;AAED,iBAAS,YAAY,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var currentPage;
|
|
2
|
-
|
|
3
|
-
module.exports = function() {
|
|
4
|
-
|
|
5
|
-
this.Given(/^I am on the cucumber\.js GitHub repository$/, function() {
|
|
6
|
-
return this.browser.visit('https://github.com/cucumber/cucumber-js');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
this.When(/^I go to the README file$/, function() {
|
|
10
|
-
return this.browser.visit('https://github.com/cucumber/cucumber-js/blob/master/README.md');
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
this.Then(/^I should see a "(.*)" section$/, function(title) {
|
|
14
|
-
// Element checking is async, so we return a promise
|
|
15
|
-
return this.browser.assert.element('a[href="#' + title.toLowerCase() + '"]', 'The "' + title + '" section was not found');
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
this.Then('I should see a "$badge" badge', function(badge) {
|
|
19
|
-
return this.browser.assert.element('img[alt="' + badge + '"]', 'The "' + badge + '" was not found');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Export a World constructor which will be the scope of all step definitions.
|
|
3
|
-
*/
|
|
4
|
-
var phantom = require('phantom');
|
|
5
|
-
var currentBrowser;
|
|
6
|
-
var currentPage;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Private method for getting a browser, re-using any already created one
|
|
10
|
-
*
|
|
11
|
-
* @return Promise
|
|
12
|
-
*/
|
|
13
|
-
function getBrowser() {
|
|
14
|
-
return new Promise(function (resolve, reject) {
|
|
15
|
-
if (currentBrowser && typeof currentBrowser === 'object') {
|
|
16
|
-
return resolve(currentBrowser);
|
|
17
|
-
}
|
|
18
|
-
return phantom.create().then(function(browser) {
|
|
19
|
-
currentBrowser = browser;
|
|
20
|
-
resolve(currentBrowser);
|
|
21
|
-
}).catch(function() {
|
|
22
|
-
reject();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Browser helpers to be used in steps
|
|
29
|
-
*/
|
|
30
|
-
var browser = {
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Visit a URL
|
|
34
|
-
*
|
|
35
|
-
* @param string url
|
|
36
|
-
* @return Promise
|
|
37
|
-
*/
|
|
38
|
-
visit: function visit(url) {
|
|
39
|
-
return getBrowser()
|
|
40
|
-
.then(function(browser) {
|
|
41
|
-
return browser.createPage();
|
|
42
|
-
}).then(function(page) {
|
|
43
|
-
currentPage = page;
|
|
44
|
-
return page.open(url);
|
|
45
|
-
}).catch(function() {
|
|
46
|
-
throw new Error('URL ' + url + ' could not be opened');
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
assert: {
|
|
51
|
-
/**
|
|
52
|
-
* Check if an element exists in the current page
|
|
53
|
-
*
|
|
54
|
-
* @param string selector - CSS selector
|
|
55
|
-
* @param string message - An error message to throw if element not found
|
|
56
|
-
*/
|
|
57
|
-
element: function element(selector, message) {
|
|
58
|
-
if (!currentPage) {
|
|
59
|
-
throw new Error('Cannot find any element as no current page!');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return currentPage.evaluate(function(selector) {
|
|
63
|
-
return document.querySelectorAll(selector).length;
|
|
64
|
-
}, selector).then(function(elementCount) {
|
|
65
|
-
if (!elementCount) {
|
|
66
|
-
throw new Error(message || 'The selector "' + selector + '" could not be found');
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Close the current browser
|
|
74
|
-
*
|
|
75
|
-
* @return void
|
|
76
|
-
*/
|
|
77
|
-
exit: function() {
|
|
78
|
-
if (currentBrowser && typeof currentBrowser === 'object') {
|
|
79
|
-
currentBrowser.exit();
|
|
80
|
-
currentBrowser = false;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
function World() {
|
|
86
|
-
this.browser = browser;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
module.exports = function(callback) {
|
|
90
|
-
this.World = World;
|
|
91
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="90" height="27" viewBox="0 0 90 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.1758 25.1949C16.8005 25.9202 15.337 26.692 13.346 26.692C5.97521 26.692 0 20.7168 0 13.346C0 5.97521 5.97521 0 13.346 0C20.7168 0 26.692 5.97521 26.692 13.346V26.0039C22.6348 22.8435 20.5351 23.9508 18.1758 25.1949ZM19.1635 13.346C19.1635 16.5589 16.5589 19.1635 13.346 19.1635C10.1331 19.1635 7.52852 16.5589 7.52852 13.346C7.52852 10.1331 10.1331 7.52852 13.346 7.52852C16.5589 7.52852 19.1635 10.1331 19.1635 13.346Z" fill="#222222"/>
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M43.3745 17.8529H42.584C41.9064 17.8529 41.2226 17.8843 40.5324 17.9471C39.8423 18.0098 39.2275 18.129 38.688 18.3047C38.1484 18.4803 37.703 18.7375 37.3517 19.0763C37.0003 19.4151 36.8247 19.8605 36.8247 20.4126C36.8247 20.764 36.9062 21.0651 37.0693 21.3161C37.2325 21.567 37.4395 21.7678 37.6904 21.9183C37.9414 22.0689 38.23 22.1756 38.5562 22.2383C38.8825 22.301 39.1961 22.3324 39.4973 22.3324C40.752 22.3324 41.7119 21.9874 42.3769 21.2972C43.042 20.6071 43.3745 19.6723 43.3745 18.4929V17.8529ZM32.044 9.83507C33.1482 8.78108 34.4343 7.99059 35.9024 7.46359C37.3705 6.93659 38.8699 6.6731 40.4007 6.6731C41.9817 6.6731 43.318 6.86758 44.4096 7.25656C45.5013 7.64553 46.3859 8.24781 47.0634 9.0634C47.741 9.87899 48.2366 10.9079 48.5503 12.1501C48.864 13.3923 49.0209 14.8666 49.0209 16.5731V26.0214H43.3745V24.0263H43.2615C42.7847 24.8043 42.0633 25.4066 41.0971 25.8332C40.1309 26.2598 39.0832 26.4731 37.9539 26.4731C37.2011 26.4731 36.4231 26.3727 35.6201 26.172C34.817 25.9712 34.083 25.645 33.418 25.1932C32.753 24.7415 32.2072 24.1393 31.7805 23.3864C31.3539 22.6335 31.1406 21.705 31.1406 20.6009C31.1406 19.2457 31.5108 18.1541 32.2511 17.3259C32.9914 16.4978 33.945 15.8579 35.1119 15.4062C36.2788 14.9545 37.5775 14.6533 39.0079 14.5028C40.4384 14.3522 41.8311 14.2769 43.1863 14.2769V13.9758C43.1863 13.0472 42.86 12.3634 42.2075 11.9242C41.5551 11.4851 40.752 11.2655 39.7984 11.2655C38.9201 11.2655 38.0731 11.4537 37.2575 11.8301C36.442 12.2066 35.7456 12.6583 35.1684 13.1853L32.044 9.83507ZM64.6425 12.8088C64.1406 12.332 63.5509 11.9305 62.8733 11.6043C62.1958 11.278 61.4806 11.1149 60.7277 11.1149C60.1505 11.1149 59.6172 11.2278 59.1279 11.4537C58.6385 11.6796 58.3939 12.0685 58.3939 12.6206C58.3939 13.1476 58.6636 13.524 59.2032 13.7499C59.7427 13.9758 60.6148 14.2267 61.8193 14.5028C62.522 14.6533 63.2309 14.8666 63.9461 15.1427C64.6614 15.4187 65.3075 15.7826 65.8847 16.2343C66.4619 16.686 66.9262 17.2381 67.2775 17.8906C67.6288 18.5431 67.8045 19.321 67.8045 20.2244C67.8045 21.4039 67.5661 22.4014 67.0893 23.217C66.6125 24.0326 65.9914 24.6913 65.226 25.1932C64.4606 25.6952 63.6011 26.059 62.6475 26.2849C61.6939 26.5107 60.7402 26.6237 59.7866 26.6237C58.2558 26.6237 56.7564 26.379 55.2883 25.8896C53.8203 25.4003 52.5969 24.6788 51.6182 23.7252L55.0813 20.0739C55.6334 20.6761 56.311 21.178 57.114 21.5796C57.9171 21.9811 58.7703 22.1818 59.6737 22.1818C60.1756 22.1818 60.6712 22.0626 61.1606 21.8242C61.6499 21.5858 61.8946 21.1655 61.8946 20.5632C61.8946 19.986 61.5935 19.5594 60.9912 19.2834C60.3889 19.0073 59.4479 18.7187 58.168 18.4176C57.5155 18.267 56.8631 18.0663 56.2106 17.8153C55.5581 17.5643 54.9747 17.2256 54.4602 16.799C53.9458 16.3723 53.5254 15.8453 53.1992 15.218C52.8729 14.5906 52.7098 13.8377 52.7098 12.9594C52.7098 11.8301 52.9482 10.8702 53.425 10.0797C53.9018 9.28925 54.5167 8.64306 55.2695 8.14116C56.0224 7.63925 56.8568 7.2691 57.7728 7.0307C58.6887 6.7923 59.5984 6.6731 60.5018 6.6731C61.9072 6.6731 63.2811 6.89268 64.6237 7.33184C65.9663 7.77101 67.1018 8.42975 68.0304 9.30808L64.6425 12.8088ZM84.292 14.5028C84.292 13.524 83.9845 12.6834 83.3697 11.9807C82.7549 11.278 81.8326 10.9267 80.603 10.9267C80.0007 10.9267 79.4486 11.0208 78.9467 11.209C78.4448 11.3972 78.0056 11.6545 77.6292 11.9807C77.2528 12.3069 76.9517 12.6896 76.7258 13.1288C76.4999 13.568 76.3745 14.0259 76.3494 14.5028H84.292ZM89.976 16.8742V17.6271C89.976 17.878 89.9634 18.1164 89.9383 18.3423H76.3494C76.3996 18.8693 76.5564 19.3461 76.8199 19.7727C77.0834 20.1993 77.4222 20.5695 77.8363 20.8832C78.2503 21.1969 78.7146 21.4415 79.229 21.6172C79.7435 21.7929 80.2767 21.8807 80.8288 21.8807C81.8075 21.8807 82.6357 21.6988 83.3132 21.3349C83.9908 20.971 84.5429 20.5005 84.9695 19.9233L89.2608 22.6336C88.3824 23.9134 87.2218 24.8984 85.7788 25.5885C84.3359 26.2786 82.6608 26.6237 80.7536 26.6237C79.3482 26.6237 78.0182 26.4041 76.7634 25.9649C75.5087 25.5258 74.4108 24.8858 73.4697 24.0451C72.5286 23.2045 71.7883 22.1693 71.2488 20.9396C70.7093 19.71 70.4395 18.3047 70.4395 16.7237C70.4395 15.1929 70.703 13.8064 71.23 12.5642C71.757 11.3219 72.4722 10.268 73.3756 9.40218C74.279 8.5364 75.3456 7.86511 76.5752 7.3883C77.8049 6.9115 79.1349 6.6731 80.5653 6.6731C81.9456 6.6731 83.2129 6.90522 84.3672 7.36948C85.5216 7.83374 86.5129 8.50503 87.341 9.38336C88.1691 10.2617 88.8153 11.3282 89.2796 12.583C89.7439 13.8377 89.976 15.2681 89.976 16.8742Z" fill="#222222"/>
|
|
4
|
-
</svg>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const {Then} = require('@cucumber/cucumber');
|
|
2
|
-
const {When} = require('@cucumber/cucumber');
|
|
3
|
-
const {Given} = require('@cucumber/cucumber');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
|
|
6
|
-
Given(/^I am on the cucumber\.js GitHub repository$/, function(callback) {
|
|
7
|
-
// The callback argument will execute the next step
|
|
8
|
-
// This is passed to zombie.visit, which will execute it once the page has loaded
|
|
9
|
-
this.browser.visit('https://github.com/cucumber/cucumber-js', callback);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
When(/^I go to the README file$/, function() {
|
|
13
|
-
const b = fs.readFileSync(__dirname + '/../logo.svg');
|
|
14
|
-
this.attach(b, 'image/svg+xml');
|
|
15
|
-
// If your code returns a promise then there is no need for the callback
|
|
16
|
-
// This works because zombie.visit returns a promise
|
|
17
|
-
return this.browser.visit('https://github.com/cucumber/cucumber-js/blob/master/README.md');
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
Then(/^I should see a "(.*)" section$/, function(title) {
|
|
21
|
-
this.attach('{"name": "some JSON"}', 'application/json');
|
|
22
|
-
// Using zombie.assert to test a link is present
|
|
23
|
-
// If the assertion fails an error will be thrown and the cucumber test will fail
|
|
24
|
-
// Zombie will use my message in the second argument as the error message
|
|
25
|
-
this.browser.assert.element('a[href="#' + title.toLowerCase() + '"]', 'The "' + title + '" section was not found');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
Then(/I should see a "(.*)" badge/, function(badge) {
|
|
29
|
-
// You can also use simple strings to match step definitions, cucumber expands this step to regexp:
|
|
30
|
-
// /^I should see a "([^"]*)" badge$/
|
|
31
|
-
this.browser.assert.element('img[alt="' + badge + '"]', 'The "' + badge + '" was not found');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
Then(/I should see nothing/, () => 'skipped');
|