cucumberjs-qase-reporter 0.2.9 → 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 +35 -36
- package/package.json +36 -45
- package/tsconfig.build.json +9 -0
- package/dist/index.d.ts +0 -36
- package/dist/index.js +0 -454
- 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 -25420
- package/examples/package.json +0 -17
- package/test/plugin.test.ts +0 -193
- /package/{examples/screenshots → screenshots}/demo.gif +0 -0
- /package/{examples/screenshots → screenshots}/screenshot.png +0 -0
package/README.md
CHANGED
|
@@ -37,16 +37,16 @@ Feature: Cucumber documentation
|
|
|
37
37
|
And I should see a "Dependencies" badge
|
|
38
38
|
```
|
|
39
39
|
---
|
|
40
|
-
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):
|
|
41
41
|
```bash
|
|
42
|
-
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
|
|
43
43
|
```
|
|
44
44
|
or
|
|
45
45
|
```bash
|
|
46
46
|
npm test
|
|
47
47
|
```
|
|
48
48
|
<p align="center">
|
|
49
|
-
<img width="65%" src="./
|
|
49
|
+
<img width="65%" src="./screenshots/screenshot.png">
|
|
50
50
|
</p>
|
|
51
51
|
|
|
52
52
|
A test run will be performed and available at:
|
|
@@ -56,56 +56,53 @@ https://app.qase.io/run/QASE_PROJECT_CODE
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
<p align="center">
|
|
59
|
-
<img src="./
|
|
59
|
+
<img src="./screenshots/demo.gif">
|
|
60
60
|
</p>
|
|
61
61
|
|
|
62
62
|
## Configuration
|
|
63
63
|
|
|
64
64
|
Qase reporter supports passing parameters using two ways:
|
|
65
|
-
using `.qaserc` file and using ENV variables.
|
|
65
|
+
using `.qaserc`/`qase.config.json` file and using ENV variables.
|
|
66
66
|
|
|
67
|
-
`.qaserc` parameters:
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
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
|
|
72
72
|
[here](https://developers.qase.io/#authentication)
|
|
73
|
-
- `
|
|
73
|
+
- *`testops.project` - Code of your project (can be extracted from main
|
|
74
74
|
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
75
75
|
`DEMOTR` is project code here)
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- `runDescription` - Set custom Run description, when new run is created
|
|
81
|
-
- `logging` - Enabled debug logging from reporter or not
|
|
82
|
-
- `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
|
|
83
80
|
|
|
84
81
|
Example configuration file:
|
|
82
|
+
|
|
85
83
|
```json
|
|
86
84
|
{
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
"debug": true,
|
|
86
|
+
"environment": 1,
|
|
87
|
+
"testops": {
|
|
88
|
+
"api": {
|
|
89
|
+
"token": "api_key"
|
|
90
|
+
},
|
|
91
|
+
"project": "project_code"
|
|
92
|
+
}
|
|
94
93
|
}
|
|
95
94
|
```
|
|
96
95
|
|
|
97
96
|
Supported ENV variables:
|
|
98
97
|
|
|
99
|
-
- `
|
|
100
|
-
- `
|
|
101
|
-
- `
|
|
102
|
-
- `
|
|
103
|
-
- `
|
|
104
|
-
- `
|
|
105
|
-
- `
|
|
106
|
-
- `
|
|
107
|
-
- `QASE_LOGGING` - Same as `logging`
|
|
108
|
-
- `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`
|
|
109
106
|
|
|
110
107
|
To run using ENV you have to execute:
|
|
111
108
|
```bash
|
|
@@ -136,11 +133,13 @@ exports.config = {
|
|
|
136
133
|
}
|
|
137
134
|
```
|
|
138
135
|
|
|
139
|
-
**Do not forget to add .
|
|
136
|
+
**Do not forget to add `.qaserc`/`qase.config.json` file!**
|
|
140
137
|
|
|
141
138
|
## Requirements
|
|
142
139
|
|
|
143
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/)
|
|
144
141
|
<!-- references -->
|
|
145
142
|
|
|
143
|
+
`@cucumber/cucumber >= 7.0.0`
|
|
144
|
+
|
|
146
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;
|