cypress-qase-reporter 1.4.2-alpha.3 → 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 +32 -28
- package/package.json +44 -41
- package/tsconfig.build.json +9 -0
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -423
- package/dist/index.js.map +0 -1
- package/dist/mocha.d.ts +0 -4
- package/dist/mocha.js +0 -20
- package/dist/mocha.js.map +0 -1
- package/dist/reportBulk.js +0 -174
- package/examples_cypress_v10/cypress/e2e/second.cy.js +0 -59
- package/examples_cypress_v10/cypress/fixtures/example.json +0 -5
- package/examples_cypress_v10/cypress/plugins/index.js +0 -21
- package/examples_cypress_v10/cypress/support/commands.js +0 -25
- package/examples_cypress_v10/cypress/support/e2e.js +0 -20
- package/examples_cypress_v10/cypress.config.js +0 -30
- package/examples_cypress_v10/package-lock.json +0 -5198
- package/examples_cypress_v10/package.json +0 -17
- package/examples_cypress_v6/cypress/fixtures/example.json +0 -5
- package/examples_cypress_v6/cypress/integration/sample_spec.js +0 -39
- package/examples_cypress_v6/cypress/plugins/index.js +0 -21
- package/examples_cypress_v6/cypress/support/commands.js +0 -25
- package/examples_cypress_v6/cypress/support/index.js +0 -20
- package/examples_cypress_v6/cypress.json +0 -20
- package/examples_cypress_v6/package-lock.json +0 -6283
- package/examples_cypress_v6/package.json +0 -17
- package/test/plugin.test.ts +0 -179
- /package/{examples_cypress_v10/screenshots → screenshots}/screenshot.png +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install cypress-qase-reporter
|
|
|
13
13
|
If you want to decorate come test with Qase Case ID you could use qase function:
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { qase } from 'cypress-qase-reporter
|
|
16
|
+
import { qase } from 'cypress-qase-reporter';
|
|
17
17
|
|
|
18
18
|
describe('My First Test', () => {
|
|
19
19
|
qase([1,2],
|
|
@@ -40,8 +40,12 @@ describe('My First Test', () => {
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
If you are going to use several specifications for execution and you have in config
|
|
43
|
-
```
|
|
44
|
-
"
|
|
43
|
+
```json
|
|
44
|
+
"testops": {
|
|
45
|
+
"run": {
|
|
46
|
+
"complete": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
45
49
|
```
|
|
46
50
|
then it is necessary to additionally set in the project settings
|
|
47
51
|
```
|
|
@@ -50,14 +54,14 @@ Allow to add results for cases in closed runs.
|
|
|
50
54
|
|
|
51
55
|
To run tests and create a test run, execute the command (for example from folder examples):
|
|
52
56
|
```bash
|
|
53
|
-
|
|
57
|
+
QASE_MODE=testops npx cypress run
|
|
54
58
|
```
|
|
55
59
|
or
|
|
56
60
|
```bash
|
|
57
61
|
npm test
|
|
58
62
|
```
|
|
59
63
|
<p align="center">
|
|
60
|
-
<img width="65%" src="
|
|
64
|
+
<img width="65%" src="./screenshots/screenshot.png">
|
|
61
65
|
</p>
|
|
62
66
|
|
|
63
67
|
A test run will be performed and available at:
|
|
@@ -70,40 +74,40 @@ https://app.qase.io/run/QASE_PROJECT_CODE
|
|
|
70
74
|
|
|
71
75
|
Reporter options (* - required):
|
|
72
76
|
|
|
73
|
-
-
|
|
77
|
+
- `mode` - `testops`/`off` Enables reporter, default - `off`
|
|
78
|
+
- `debug` - Enables debug logging, defaule - `false`
|
|
79
|
+
- `environment` - To execute with the sending of the envinroment information
|
|
80
|
+
- *`testops.api.token` - Token for API access, you can find more information
|
|
74
81
|
[here](https://developers.qase.io/#authentication)
|
|
75
|
-
- *`
|
|
76
|
-
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
82
|
+
- *`testops.project` - Code of your project (can be extracted from main
|
|
83
|
+
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
77
84
|
`DEMOTR` is project code here)
|
|
78
|
-
- `
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
81
|
-
- `
|
|
82
|
-
- `
|
|
83
|
-
- `
|
|
84
|
-
- `runComplete` [true/false] - Permission for automatic completion of the test run
|
|
85
|
+
- `testops.uploadAttachments` - Permission to send screenshots to Qase TMS
|
|
86
|
+
- `testops.run.id` - Pass Run ID
|
|
87
|
+
- `testops.run.title` - Set custom Run name, when new run is created
|
|
88
|
+
- `testops.run.description` - Set custom Run description, when new run is created
|
|
89
|
+
- `testops.run.complete` - Whether the run should be completed
|
|
90
|
+
- `framework.cypress.screenshotFolder` - Folder for save screenshot cypress
|
|
85
91
|
|
|
86
|
-
#### You can check example configuration with multiple reporters in [demo project
|
|
92
|
+
#### You can check example configuration with multiple reporters in [demo project](../examples/cypress/cypress.config.js).
|
|
87
93
|
|
|
88
94
|
Supported ENV variables:
|
|
89
95
|
|
|
90
|
-
- `
|
|
91
|
-
|
|
92
|
-
- `
|
|
93
|
-
- `
|
|
94
|
-
- `
|
|
95
|
-
- `
|
|
96
|
-
|
|
97
|
-
- `
|
|
98
|
-
- `QASE_ENVIRONMENT_ID` - To execute with the sending of the envinroment information
|
|
99
|
-
- `QASE_SCREENSHOT_FOLDER` - Folder for save screenshot cypress
|
|
100
|
-
- `QASE_SCREENSHOT_SENDING` - Permission to send screenshots to Qase TMS
|
|
101
|
-
- `QASE_RUN_COMPLETE` - Permission for automatic completion of the test run
|
|
96
|
+
- `QASE_MODE` - Same as `mode`
|
|
97
|
+
- `QASE_DEBUG` - Same as `debug`
|
|
98
|
+
- `QASE_ENVIRONMENT` - Same as `environment`
|
|
99
|
+
- `QASE_TESTOPS_API_TOKEN` - Same as `testops.api.token`
|
|
100
|
+
- `QASE_TESTOPS_PROJECT` - Same as `testops.project`
|
|
101
|
+
- `QASE_TESTOPS_RUN_ID` - Pass Run ID from ENV and override reporter option `testops.run.id`
|
|
102
|
+
- `QASE_TESTOPS_RUN_TITLE` - Same as `testops.run.title`
|
|
103
|
+
- `QASE_TESTOPS_RUN_DESCRIPTION` - Same as `testops.run.description`
|
|
102
104
|
|
|
103
105
|
## Requirements
|
|
104
106
|
|
|
105
107
|
We maintain the reporter on LTS versions of Node. You can find the current versions by following the [link](https://nodejs.org/en/about/releases/)
|
|
106
108
|
|
|
109
|
+
`cypress >= 8.0.0`
|
|
110
|
+
|
|
107
111
|
<!-- references -->
|
|
108
112
|
|
|
109
113
|
[auth]: https://developers.qase.io/#authentication
|
package/package.json
CHANGED
|
@@ -1,58 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cypress-qase-reporter",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Qase
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
|
+
"description": "Qase Cypress Reporter",
|
|
5
|
+
"homepage": "https://github.com/qase-tms/qase-javascript",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.cjs.js",
|
|
8
|
+
"types": "./dist/index.cjs.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/index.js",
|
|
11
|
+
"./mocha": "./dist/mocha.js",
|
|
12
|
+
"./reporter": "./dist/reporter.js",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
"*": {
|
|
17
|
+
".": [
|
|
18
|
+
"./dist/index.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"mocha": [
|
|
21
|
+
"./dist/mocha.d.ts"
|
|
22
|
+
],
|
|
23
|
+
"reporter": [
|
|
24
|
+
"./dist/reporter.d.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
8
28
|
"bugs": {
|
|
9
|
-
"url": "https://github.com/qase-tms/qase-
|
|
29
|
+
"url": "https://github.com/qase-tms/qase-javascript/issues"
|
|
10
30
|
},
|
|
11
31
|
"repository": {
|
|
12
32
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/qase-tms/qase-
|
|
33
|
+
"url": "git+https://github.com/qase-tms/qase-javascript.git"
|
|
14
34
|
},
|
|
15
35
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
36
|
+
"node": ">=14"
|
|
17
37
|
},
|
|
18
38
|
"scripts": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"test": "jest --coverage",
|
|
24
|
-
"clean": "rm -rf dist || true"
|
|
25
|
-
},
|
|
26
|
-
"author": {
|
|
27
|
-
"name": "Parviz Khavari",
|
|
28
|
-
"email": "csctclan@gmail.com"
|
|
39
|
+
"build": "npm run clean && tsc --project tsconfig.build.json",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"test": "jest --passWithNoTests",
|
|
42
|
+
"clean": "rm -rf dist"
|
|
29
43
|
},
|
|
44
|
+
"author": "Nikita Fedorov <nik333r@gmail.com>",
|
|
30
45
|
"license": "Apache-2.0",
|
|
31
46
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
|
|
47
|
+
"qase-javascript-commons": "^2.0.0-beta.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"cypress": ">=8.0.0"
|
|
34
51
|
},
|
|
35
52
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@types/
|
|
38
|
-
"@types/
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"ansi-regex": "^6.0.1",
|
|
44
|
-
"axios-mock-adapter": "^1.19.0",
|
|
45
|
-
"chalk": "^4.1.0",
|
|
46
|
-
"cypress": "^4.12.1",
|
|
47
|
-
"eslint": "^7.14.0",
|
|
48
|
-
"eslint-plugin-jsdoc": "^26.0.1",
|
|
49
|
-
"eslint-plugin-prefer-arrow": "^1.2.2",
|
|
50
|
-
"handlebars": "^4.7.7",
|
|
51
|
-
"jest": "^26.6.3",
|
|
52
|
-
"json-schema": "^0.4.0",
|
|
53
|
-
"mocha": "^9.0.0",
|
|
54
|
-
"nodemon": "^2.0.6",
|
|
55
|
-
"ts-jest": "^26.4.4",
|
|
56
|
-
"typescript": "^3.9.7"
|
|
53
|
+
"@jest/globals": "^29.5.0",
|
|
54
|
+
"@types/jest": "^29.5.2",
|
|
55
|
+
"@types/mocha": "^10.0.1",
|
|
56
|
+
"ajv": "^8.12.0",
|
|
57
|
+
"jest": "^29.5.0",
|
|
58
|
+
"mocha": "^10.2.0",
|
|
59
|
+
"ts-jest": "^29.1.0"
|
|
57
60
|
}
|
|
58
61
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { MochaOptions, Runner, reporters } from 'mocha';
|
|
2
|
-
declare class CypressQaseReporter extends reporters.Base {
|
|
3
|
-
testCasesForPublishingCount: number;
|
|
4
|
-
private api;
|
|
5
|
-
private pending;
|
|
6
|
-
private shouldPublish;
|
|
7
|
-
private results;
|
|
8
|
-
private options;
|
|
9
|
-
private runId?;
|
|
10
|
-
private isDisabled;
|
|
11
|
-
private resultsForPublishing;
|
|
12
|
-
constructor(runner: Runner, options: MochaOptions);
|
|
13
|
-
private static getEnv;
|
|
14
|
-
private static getCaseId;
|
|
15
|
-
private static createRunObject;
|
|
16
|
-
private static createHeaders;
|
|
17
|
-
private static getSuitePath;
|
|
18
|
-
private static getPackageVersion;
|
|
19
|
-
private log;
|
|
20
|
-
private addRunnerListeners;
|
|
21
|
-
private checkProject;
|
|
22
|
-
private createRun;
|
|
23
|
-
private checkRun;
|
|
24
|
-
private saveRunId;
|
|
25
|
-
private logTestItem;
|
|
26
|
-
private transformCaseResultToBulkObject;
|
|
27
|
-
}
|
|
28
|
-
export = CypressQaseReporter;
|