cypress-qase-reporter 1.4.1 → 1.4.2-alpha.2
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 +39 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +277 -120
- package/dist/index.js.map +1 -1
- package/dist/mocha.js +3 -0
- package/dist/mocha.js.map +1 -1
- package/dist/reportBulk.js +174 -0
- package/examples/cypress/fixtures/example.json +5 -0
- package/examples/cypress/integration/sample_spec.js +39 -0
- package/examples/cypress/plugins/index.js +21 -0
- package/examples/cypress/support/commands.js +25 -0
- package/examples/cypress/support/index.js +20 -0
- package/examples/cypress.json +20 -0
- package/examples/package-lock.json +4156 -0
- package/examples/package.json +17 -0
- package/examples/screenshots/screenshot.png +0 -0
- package/package.json +4 -3
- package/docs/stdout.png +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,8BAA8B;AAC9B,sDAAsD;AACtD,uCAAqE;AACrE,+BAA8D;AAC9D,+CAAoD;AACpD,iCAAiC;AACjC,gDAA0B;AAC1B,yBAAkC;AAElC,mEAAmE;AAC7D,IAAA,KACJ,cAAM,CAAC,SAAS,EADV,eAAe,qBAAA,EAAE,eAAe,qBAAA,EAAE,kBAAkB,wBAAA,EAAE,aAAa,mBACzD,CAAC;AAEnB,IAAK,IAWJ;AAXD,WAAK,IAAI;IACL,8BAAsB,CAAA;IACtB,mCAA2B,CAAA;IAC3B,sCAA8B,CAAA;IAC9B,6BAAqB,CAAA;IACrB,iCAAyB,CAAA;IACzB,+CAAuC,CAAA;IACvC,6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AG,MAAM,CAAC;SACpB;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAK,OAAO,CAAC,KAAK,mBAAc,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAG,EAAE,CAAC,CAAC;QACnF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../src/mocha.ts"],"names":[],"mappings":";AACA,iBAAS;IACL,IAAI,EAAE,UAAI,MAA6C,EAAE,IAAO;QAC5D,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,IAAI,CAAC;SACf;QACD,IAAM,OAAO,GAAG,IAAwC,CAAC;QACzD,IAAI,OAA4B,CAAC;QACjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC1D,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;SACjC;aAAM;YACH,OAAO,GAAG,MAAM,CAAC;SACpB;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAK,OAAO,CAAC,KAAK,mBAAc,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAG,EAAE,CAAC,CAAC;QACnF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
4
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
6
|
+
|
|
7
|
+
const { QaseApi } = require('qaseio');
|
|
8
|
+
const FormData = require('form-data');
|
|
9
|
+
const chalk = require('chalk');
|
|
10
|
+
const crypto = require('crypto');
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
const config = JSON.parse(process.env?.reporting_config);
|
|
15
|
+
const screenshotsConfig = JSON.parse(process.env?.screenshots_config);
|
|
16
|
+
|
|
17
|
+
let hashesMap = {};
|
|
18
|
+
|
|
19
|
+
let customBoundary = '----------------------------';
|
|
20
|
+
crypto.randomBytes(24).forEach((value) => {
|
|
21
|
+
customBoundary += Math.floor(value * 10).toString(16);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
class CustomBoundaryFormData extends FormData {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getBoundary() {
|
|
30
|
+
return customBoundary;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const getCaseId = (str) => {
|
|
35
|
+
const regexp = /(\(Qase ID ([\d,]+)\))/;
|
|
36
|
+
const results = regexp.exec(str);
|
|
37
|
+
if (results && results.length === 3) {
|
|
38
|
+
return results[2].split(',').map((value) => Number.parseInt(value, 10));
|
|
39
|
+
}
|
|
40
|
+
return [];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const getFiles = (pathToFile) => {
|
|
44
|
+
const files = [];
|
|
45
|
+
for (const file of fs.readdirSync(pathToFile)) {
|
|
46
|
+
const fullPath = `${pathToFile}/${file}`;
|
|
47
|
+
|
|
48
|
+
if(fs.lstatSync(fullPath).isDirectory()) {
|
|
49
|
+
getFiles(fullPath).forEach((x) => files.push(`${file}/${x}`));
|
|
50
|
+
} else {
|
|
51
|
+
files.push(file);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return files;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const parseScreenshotDirectory = () => {
|
|
58
|
+
const pathToScreenshotDir = path.join(process.cwd(), `cypress/${screenshotsConfig.screenshotFolder}`);
|
|
59
|
+
const files = getFiles(pathToScreenshotDir);
|
|
60
|
+
const filePathesByCaseIdMap = {};
|
|
61
|
+
|
|
62
|
+
files.forEach((file) => {
|
|
63
|
+
if(file.includes('Qase ID')) {
|
|
64
|
+
const caseIds = getCaseId(file);
|
|
65
|
+
|
|
66
|
+
if (caseIds) {
|
|
67
|
+
caseIds.forEach((caseId) => {
|
|
68
|
+
const attachmentObject = {
|
|
69
|
+
caseId,
|
|
70
|
+
file: [file],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
filePathesByCaseIdMap[caseId] = attachmentObject;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
return filePathesByCaseIdMap;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const publishBulkResult = async () => {
|
|
83
|
+
if (config) {
|
|
84
|
+
console.log('Publication is started');
|
|
85
|
+
|
|
86
|
+
const api = new QaseApi(config.apiToken, config.basePath, config.headers, CustomBoundaryFormData);
|
|
87
|
+
|
|
88
|
+
if (screenshotsConfig.screenshotFolder && screenshotsConfig.sendScreenshot) {
|
|
89
|
+
try {
|
|
90
|
+
const filePathesByCaseIdMap = parseScreenshotDirectory();
|
|
91
|
+
|
|
92
|
+
if (filePathesByCaseIdMap) {
|
|
93
|
+
const filesMap = Object.values(filePathesByCaseIdMap);
|
|
94
|
+
const uploadAttachmentsPromisesArray = filesMap.map(async (failedCase) => {
|
|
95
|
+
const caseId = failedCase.caseId;
|
|
96
|
+
|
|
97
|
+
const pathToFile = `./cypress/${screenshotsConfig.screenshotFolder}/${failedCase.file[0]}`;
|
|
98
|
+
|
|
99
|
+
const data = fs.createReadStream(pathToFile);
|
|
100
|
+
|
|
101
|
+
const options = {
|
|
102
|
+
headers: {
|
|
103
|
+
'Content-Type':
|
|
104
|
+
'multipart/form-data; boundary=' + customBoundary,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
if (data) {
|
|
109
|
+
const resp = await api.attachments.uploadAttachment(
|
|
110
|
+
config.code,
|
|
111
|
+
[data],
|
|
112
|
+
options
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
hash: resp.data.result?.[0].hash,
|
|
117
|
+
caseId,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const responses = await Promise.all(uploadAttachmentsPromisesArray);
|
|
123
|
+
|
|
124
|
+
hashesMap = responses.reduce((accum, value) => {
|
|
125
|
+
accum[value.caseId] = value.hash;
|
|
126
|
+
return accum;
|
|
127
|
+
}, {});
|
|
128
|
+
}
|
|
129
|
+
} catch (error) {
|
|
130
|
+
console.log(chalk`{red Error during sending screenshots ${error}}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
const { body } = config;
|
|
136
|
+
|
|
137
|
+
if (hashesMap) {
|
|
138
|
+
const results = body.results;
|
|
139
|
+
|
|
140
|
+
const resultsWithAttachmentHashes = results.map(((result) => {
|
|
141
|
+
if (hashesMap[result.case_id]) {
|
|
142
|
+
return {
|
|
143
|
+
...result,
|
|
144
|
+
attachments: [hashesMap[result.case_id]],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return result;
|
|
149
|
+
}));
|
|
150
|
+
|
|
151
|
+
body.results = resultsWithAttachmentHashes;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const res = await api.results.createResultBulk(
|
|
155
|
+
config.code,
|
|
156
|
+
config.runId,
|
|
157
|
+
body
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
if (res.status === 200) {
|
|
161
|
+
console.log(chalk`{green Results sent}`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if(config.runComplete) {
|
|
165
|
+
await api.runs.completeRun(config.code, config.runId);
|
|
166
|
+
console.log(chalk`{green Run compleated}`);
|
|
167
|
+
}
|
|
168
|
+
} catch (error) {
|
|
169
|
+
console.log('Error till publishing', error);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
publishBulkResult();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { qase } from 'cypress-qase-reporter/dist/mocha';
|
|
2
|
+
|
|
3
|
+
describe('My First Test', () => {
|
|
4
|
+
qase(1, it('clicking "type" navigates to a new url', () => {
|
|
5
|
+
cy.visit('https://example.cypress.io');
|
|
6
|
+
|
|
7
|
+
cy.contains('type').click();
|
|
8
|
+
|
|
9
|
+
// Should be on a new URL which includes '/commands/actions'
|
|
10
|
+
cy.url().should('include', '/commands/actions');
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
qase(2, it('Gets, types and asserts', () => {
|
|
14
|
+
cy.visit('https://example.cypress.io');
|
|
15
|
+
|
|
16
|
+
cy.contains('type').click();
|
|
17
|
+
|
|
18
|
+
// Should be on a new URL which includes '/commands/actions'
|
|
19
|
+
cy.url().should('include', '/commands/actions');
|
|
20
|
+
// Get an input, type into it and verify that the value has been updated
|
|
21
|
+
cy.get('.action-email')
|
|
22
|
+
.type('fake@email.com')
|
|
23
|
+
.should('have.value', 'unexpected@email.com');
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
qase(3, it.skip('Gets, types and asserts', () => {
|
|
27
|
+
cy.visit('https://example.cypress.io');
|
|
28
|
+
|
|
29
|
+
cy.contains('type').click();
|
|
30
|
+
|
|
31
|
+
// Should be on a new URL which includes '/commands/actions'
|
|
32
|
+
cy.url().should('include', '/commands/actions');
|
|
33
|
+
|
|
34
|
+
// Get an input, type into it and verify that the value has been updated
|
|
35
|
+
cy.get('.action-email')
|
|
36
|
+
.type('fake@email.com')
|
|
37
|
+
.should('have.value', 'unexpected@email.com');
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.js can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {Cypress.PluginConfig}
|
|
17
|
+
*/
|
|
18
|
+
module.exports = (on, config) => {
|
|
19
|
+
// `on` is used to hook into various events Cypress emits
|
|
20
|
+
// `config` is the resolved Cypress config
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ***********************************************
|
|
2
|
+
// This example commands.js shows you how to
|
|
3
|
+
// create various custom commands and overwrite
|
|
4
|
+
// existing commands.
|
|
5
|
+
//
|
|
6
|
+
// For more comprehensive examples of custom
|
|
7
|
+
// commands please read more here:
|
|
8
|
+
// https://on.cypress.io/custom-commands
|
|
9
|
+
// ***********************************************
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
// -- This is a parent command --
|
|
13
|
+
// Cypress.Commands.add("login", (email, password) => { ... })
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// -- This is a child command --
|
|
17
|
+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
// -- This is a dual command --
|
|
21
|
+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
// -- This will overwrite an existing command --
|
|
25
|
+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/index.js is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"reporter": "cypress-multi-reporters",
|
|
3
|
+
"reporterOptions": {
|
|
4
|
+
"reporterEnabled": "cypress-mochawesome-reporter, cypress-qase-reporter",
|
|
5
|
+
"cypressMochawesomeReporterReporterOptions": {
|
|
6
|
+
"charts": true
|
|
7
|
+
},
|
|
8
|
+
"cypressQaseReporterReporterOptions": {
|
|
9
|
+
"apiToken": "api_key",
|
|
10
|
+
"projectCode": "project_code",
|
|
11
|
+
"logging": true,
|
|
12
|
+
"basePath": "https://api.qase.io/v1",
|
|
13
|
+
"screenshotFolder": "screenshots",
|
|
14
|
+
"sendScreenshot": true,
|
|
15
|
+
"runComplete": false,
|
|
16
|
+
"environmentId": 1
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"video": false
|
|
20
|
+
}
|