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/README.md
CHANGED
|
@@ -36,34 +36,17 @@ Feature: Cucumber documentation
|
|
|
36
36
|
Then I should see a "Build Status" badge
|
|
37
37
|
And I should see a "Dependencies" badge
|
|
38
38
|
```
|
|
39
|
-
|
|
40
|
-
You should also have an active item in the project settings at
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
https://app.qase.io/project/QASE_PROJECT_CODE/settings/options
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
options in the `Test Runs` block:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
Auto create test cases
|
|
50
|
-
```
|
|
51
|
-
and
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Allow submitting results in bulk
|
|
55
|
-
```
|
|
56
39
|
---
|
|
57
|
-
To run tests and create a test run, execute the command (for example from folder examples):
|
|
40
|
+
To run tests and create a test run, execute the command (for example from folder examples/cucumberjs):
|
|
58
41
|
```bash
|
|
59
|
-
cucumber-js -f cucumberjs-qase-reporter
|
|
42
|
+
QASE_MODE=testops cucumber-js -f cucumberjs-qase-reporter:/dev/null features -r zombie/support -r zombie/steps --publish-quiet
|
|
60
43
|
```
|
|
61
44
|
or
|
|
62
45
|
```bash
|
|
63
46
|
npm test
|
|
64
47
|
```
|
|
65
48
|
<p align="center">
|
|
66
|
-
<img width="65%" src="./
|
|
49
|
+
<img width="65%" src="./screenshots/screenshot.png">
|
|
67
50
|
</p>
|
|
68
51
|
|
|
69
52
|
A test run will be performed and available at:
|
|
@@ -73,56 +56,53 @@ https://app.qase.io/run/QASE_PROJECT_CODE
|
|
|
73
56
|
```
|
|
74
57
|
|
|
75
58
|
<p align="center">
|
|
76
|
-
<img src="./
|
|
59
|
+
<img src="./screenshots/demo.gif">
|
|
77
60
|
</p>
|
|
78
61
|
|
|
79
62
|
## Configuration
|
|
80
63
|
|
|
81
64
|
Qase reporter supports passing parameters using two ways:
|
|
82
|
-
using `.qaserc` file and using ENV variables.
|
|
65
|
+
using `.qaserc`/`qase.config.json` file and using ENV variables.
|
|
83
66
|
|
|
84
|
-
`.qaserc` parameters:
|
|
85
|
-
- `
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
67
|
+
`.qaserc` parameters, (* - required):
|
|
68
|
+
- `mode` - `testops`/`off` Enables reporter, default - `off`
|
|
69
|
+
- `debug` - Enables debug logging, defaule - `false`
|
|
70
|
+
- `environment` - To execute with the sending of the envinroment information
|
|
71
|
+
- *`testops.api.token` - Token for API access, you can find more information
|
|
89
72
|
[here](https://developers.qase.io/#authentication)
|
|
90
|
-
- `
|
|
73
|
+
- *`testops.project` - Code of your project (can be extracted from main
|
|
91
74
|
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
92
75
|
`DEMOTR` is project code here)
|
|
93
|
-
- `
|
|
94
|
-
- `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- `runDescription` - Set custom Run description, when new run is created
|
|
98
|
-
- `logging` - Enabled debug logging from reporter or not
|
|
99
|
-
- `rootSuiteTitle` - A parent suite for your autocreated tests
|
|
76
|
+
- `testops.run.id` - Pass Run ID
|
|
77
|
+
- `testops.run.title` - Set custom Run name, when new run is created
|
|
78
|
+
- `testops.run.description` - Set custom Run description, when new run is created
|
|
79
|
+
- `testops.run.complete` - Whether the run should be completed
|
|
100
80
|
|
|
101
81
|
Example configuration file:
|
|
82
|
+
|
|
102
83
|
```json
|
|
103
84
|
{
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
85
|
+
"debug": true,
|
|
86
|
+
"environment": 1,
|
|
87
|
+
"testops": {
|
|
88
|
+
"api": {
|
|
89
|
+
"token": "api_key"
|
|
90
|
+
},
|
|
91
|
+
"project": "project_code"
|
|
92
|
+
}
|
|
111
93
|
}
|
|
112
94
|
```
|
|
113
95
|
|
|
114
96
|
Supported ENV variables:
|
|
115
97
|
|
|
116
|
-
- `
|
|
117
|
-
- `
|
|
118
|
-
- `
|
|
119
|
-
- `
|
|
120
|
-
- `
|
|
121
|
-
- `
|
|
122
|
-
- `
|
|
123
|
-
- `
|
|
124
|
-
- `QASE_LOGGING` - Same as `logging`
|
|
125
|
-
- `QASE_ROOT_SUITE_TITLE` - Same as `rootSuiteTitle`
|
|
98
|
+
- `QASE_MODE` - Same as `mode`
|
|
99
|
+
- `QASE_DEBUG` - Same as `debug`
|
|
100
|
+
- `QASE_ENVIRONMENT` - Same as `environment`
|
|
101
|
+
- `QASE_TESTOPS_API_TOKEN` - Same as `testops.api.token`
|
|
102
|
+
- `QASE_TESTOPS_PROJECT` - Same as `testops.project`
|
|
103
|
+
- `QASE_TESTOPS_RUN_ID` - Pass Run ID from ENV and override reporter option `testops.run.id`
|
|
104
|
+
- `QASE_TESTOPS_RUN_TITLE` - Same as `testops.run.title`
|
|
105
|
+
- `QASE_TESTOPS_RUN_DESCRIPTION` - Same as `testops.run.description`
|
|
126
106
|
|
|
127
107
|
To run using ENV you have to execute:
|
|
128
108
|
```bash
|
|
@@ -153,8 +133,13 @@ exports.config = {
|
|
|
153
133
|
}
|
|
154
134
|
```
|
|
155
135
|
|
|
156
|
-
**Do not forget to add .
|
|
136
|
+
**Do not forget to add `.qaserc`/`qase.config.json` file!**
|
|
137
|
+
|
|
138
|
+
## Requirements
|
|
157
139
|
|
|
140
|
+
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/)
|
|
158
141
|
<!-- references -->
|
|
159
142
|
|
|
143
|
+
`@cucumber/cucumber >= 7.0.0`
|
|
144
|
+
|
|
160
145
|
[auth]: https://developers.qase.io/#authentication
|
package/package.json
CHANGED
|
@@ -1,63 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cucumberjs-qase-reporter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "Qase TMS CucumberJS Reporter",
|
|
5
|
+
"homepage": "https://github.com/qase-tms/qase-javascript",
|
|
5
6
|
"main": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
7
|
-
"
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./reporter": "./dist/reporter.js",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"typesVersions": {
|
|
14
|
+
"*": {
|
|
15
|
+
".": [
|
|
16
|
+
"./dist/index.d.ts"
|
|
17
|
+
],
|
|
18
|
+
"reporter": [
|
|
19
|
+
"./dist/reporter.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
8
23
|
"bugs": {
|
|
9
|
-
"url": "https://github.com/qase-tms/qase-javascript/"
|
|
24
|
+
"url": "https://github.com/qase-tms/qase-javascript/issues"
|
|
10
25
|
},
|
|
11
26
|
"repository": {
|
|
12
27
|
"type": "git",
|
|
13
|
-
"url": ""
|
|
28
|
+
"url": "git+https://github.com/qase-tms/qase-javascript.git"
|
|
14
29
|
},
|
|
15
30
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
31
|
+
"node": ">=14"
|
|
17
32
|
},
|
|
18
33
|
"scripts": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"build": "npm run clean && npm run dev",
|
|
24
|
-
"test": "jest --coverage",
|
|
25
|
-
"clean": "rm -rf dist || true",
|
|
26
|
-
"example": "npm run build && cd examples && npm run test-zombie"
|
|
27
|
-
},
|
|
28
|
-
"author": {
|
|
29
|
-
"name": "Parviz Khavari",
|
|
30
|
-
"email": "havaripa@gmail.com"
|
|
34
|
+
"build": "npm run clean && tsc --project tsconfig.build.json",
|
|
35
|
+
"lint": "eslint .",
|
|
36
|
+
"test": "jest --passWithNoTests",
|
|
37
|
+
"clean": "rm -rf dist"
|
|
31
38
|
},
|
|
39
|
+
"author": "Parviz Khavari <havaripa@gmail.com>",
|
|
32
40
|
"license": "Apache-2.0",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@cucumber/cucumber": "^7.0.0",
|
|
35
|
-
"@cucumber/messages": "^14.0.1",
|
|
36
|
-
"@hutson/npm-deploy-git-tag": "^6.0.0",
|
|
37
|
-
"@types/jest": "^23.3.7",
|
|
38
|
-
"@types/long": "^4.0.1",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
|
40
|
-
"@typescript-eslint/eslint-plugin-tslint": "^3.10.1",
|
|
41
|
-
"@typescript-eslint/parser": "^3.10.1",
|
|
42
|
-
"ansi-regex": "^6.0.1",
|
|
43
|
-
"axios-mock-adapter": "^1.19.0",
|
|
44
|
-
"eslint": "^7.17.0",
|
|
45
|
-
"eslint-plugin-jsdoc": "^26.0.1",
|
|
46
|
-
"eslint-plugin-prefer-arrow": "^1.2.1",
|
|
47
|
-
"handlebars": "^4.7.7",
|
|
48
|
-
"jest": "^26.6.3",
|
|
49
|
-
"json-schema": "^0.4.0",
|
|
50
|
-
"long": "^4.0.0",
|
|
51
|
-
"nodemon": "^2.0.7",
|
|
52
|
-
"ts-jest": "^26.4.4",
|
|
53
|
-
"typescript": "^3.9.3"
|
|
54
|
-
},
|
|
55
41
|
"dependencies": {
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
42
|
+
"@cucumber/messages": "^22.0.0",
|
|
43
|
+
"qase-javascript-commons": "^2.0.0-beta.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@cucumber/cucumber": ">=7.0.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@jest/globals": "^29.5.0",
|
|
50
|
+
"@types/jest": "^29.5.2",
|
|
51
|
+
"jest": "^29.5.0",
|
|
52
|
+
"ts-jest": "^29.1.0"
|
|
62
53
|
}
|
|
63
54
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Formatter } from '@cucumber/cucumber';
|
|
2
|
-
import { IFormatterOptions } from '@cucumber/cucumber/lib/formatter';
|
|
3
|
-
declare class QaseReporter extends Formatter {
|
|
4
|
-
private readonly config;
|
|
5
|
-
private api;
|
|
6
|
-
private enabled;
|
|
7
|
-
private pickleInfo;
|
|
8
|
-
private testCaseStarts;
|
|
9
|
-
private testCaseStartedResult;
|
|
10
|
-
private testCaseStartedAttachment;
|
|
11
|
-
private testCaseStartedErrors;
|
|
12
|
-
private testCaseScenarioId;
|
|
13
|
-
private pending;
|
|
14
|
-
private results;
|
|
15
|
-
private scenarios;
|
|
16
|
-
private uploadsInQueueCount;
|
|
17
|
-
constructor(options: IFormatterOptions);
|
|
18
|
-
private waitUploads;
|
|
19
|
-
private upload;
|
|
20
|
-
private publishResults;
|
|
21
|
-
private addErrorMessage;
|
|
22
|
-
private _log;
|
|
23
|
-
private checkProject;
|
|
24
|
-
private createRun;
|
|
25
|
-
private createRunObject;
|
|
26
|
-
private checkRun;
|
|
27
|
-
private saveRunId;
|
|
28
|
-
private logTestItem;
|
|
29
|
-
private addForSending;
|
|
30
|
-
private addKnownCasesForSending;
|
|
31
|
-
private addNewCasesForSending;
|
|
32
|
-
private extractIds;
|
|
33
|
-
private createHeaders;
|
|
34
|
-
private getPackageVersion;
|
|
35
|
-
}
|
|
36
|
-
export = QaseReporter;
|