cypress-qase-reporter 1.4.0 → 1.4.1
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 +51 -44
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,50 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
> # Qase TMS Cypress reporter
|
|
2
|
+
>
|
|
3
|
+
> Publish results simple and easy.
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
5
|
+
## How to integrate
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
npm install cypress-qase-reporter
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
Reporter options (* - required):
|
|
14
|
-
|
|
15
|
-
- *`apiToken` - Token for API access, you can find more information
|
|
16
|
-
[here](https://developers.qase.io/#authentication)
|
|
17
|
-
- *`projectCode` - Code of your project (can be extracted from main
|
|
18
|
-
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
19
|
-
`DEMOTR` is project code here)
|
|
20
|
-
- `runId` - Run ID from Qase TMS (also can be got from run URL)
|
|
21
|
-
- `logging` [true/false] - Enabled debug logging from reporter or not
|
|
22
|
-
|
|
23
|
-
Example cypress.json config:
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"reporter": "cypress-qase-reporter",
|
|
28
|
-
"reporterOptions": {
|
|
29
|
-
"apiToken": "578e3b73a34f06e84eafea103cd44dc24253b2c5",
|
|
30
|
-
"projectCode": "PRJCODE",
|
|
31
|
-
"runId": 45,
|
|
32
|
-
"logging": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
You can check example configuration with multiple reporters in [demo project](./demo/cypress.json)
|
|
38
|
-
|
|
39
|
-
Supported ENV variables:
|
|
40
|
-
|
|
41
|
-
- `QASE_REPORT` - You **should** pass this ENV if you want to use
|
|
42
|
-
qase reporter
|
|
43
|
-
- `QASE_RUN_ID` - Pass Run ID from ENV and override reporter options
|
|
44
|
-
- `QASE_RUN_NAME` - Set custom Run name, when new run is created
|
|
45
|
-
- `QASE_RUN_DESCRIPTION` - Set custom Run description, when new run is created
|
|
46
|
-
|
|
47
|
-
## Using Reporter
|
|
11
|
+
## Example of usage
|
|
48
12
|
|
|
49
13
|
If you want to decorate come test with Qase Case ID you could use qase function:
|
|
50
14
|
|
|
@@ -76,11 +40,54 @@ describe('My First Test', () => {
|
|
|
76
40
|
|
|
77
41
|
```
|
|
78
42
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
To start cypress run with qase reporter run it like this:
|
|
43
|
+
To run tests and create a test run, execute the command:
|
|
82
44
|
```bash
|
|
83
45
|
QASE_REPORT=1 npx cypress run
|
|
84
46
|
```
|
|
85
47
|
|
|
86
48
|

|
|
49
|
+
|
|
50
|
+
A test run will be performed and available at:
|
|
51
|
+
```
|
|
52
|
+
https://app.qase.io/run/QASE_PROJECT_CODE
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
Reporter options (* - required):
|
|
58
|
+
|
|
59
|
+
- *`apiToken` - Token for API access, you can find more information
|
|
60
|
+
[here](https://developers.qase.io/#authentication)
|
|
61
|
+
- *`projectCode` - Code of your project (can be extracted from main
|
|
62
|
+
page of your project: `https://app.qase.io/project/DEMOTR` -
|
|
63
|
+
`DEMOTR` is project code here)
|
|
64
|
+
- `runId` - Run ID from Qase TMS (also can be got from run URL)
|
|
65
|
+
- `logging` [true/false] - Enabled debug logging from reporter or not
|
|
66
|
+
|
|
67
|
+
Example `cypress.json` config:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"reporter": "cypress-qase-reporter",
|
|
72
|
+
"reporterOptions": {
|
|
73
|
+
"apiToken": "api_key",
|
|
74
|
+
"projectCode": "project_code",
|
|
75
|
+
"runId": 45,
|
|
76
|
+
"logging": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You can check example configuration with multiple reporters in [demo project](./demo/cypress.json).
|
|
82
|
+
|
|
83
|
+
Supported ENV variables:
|
|
84
|
+
|
|
85
|
+
- `QASE_REPORT` - You **should** pass this ENV if you want to use
|
|
86
|
+
qase reporter
|
|
87
|
+
- `QASE_RUN_ID` - Pass Run ID from ENV and override reporter options
|
|
88
|
+
- `QASE_RUN_NAME` - Set custom Run name, when new run is created
|
|
89
|
+
- `QASE_RUN_DESCRIPTION` - Set custom Run description, when new run is created
|
|
90
|
+
|
|
91
|
+
<!-- references -->
|
|
92
|
+
|
|
93
|
+
[auth]: https://developers.qase.io/#authentication
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cypress-qase-reporter",
|
|
3
|
-
"version": "v1.4.
|
|
3
|
+
"version": "v1.4.1",
|
|
4
4
|
"description": "Qase TMS Cypress Reporter",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^3.10.1",
|
|
40
40
|
"@typescript-eslint/eslint-plugin-tslint": "^3.10.1",
|
|
41
41
|
"@typescript-eslint/parser": "^3.10.1",
|
|
42
|
+
"ansi-regex": "^6.0.1",
|
|
42
43
|
"axios-mock-adapter": "^1.19.0",
|
|
43
44
|
"chalk": "^4.1.0",
|
|
44
45
|
"cypress": "^4.12.1",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"eslint-plugin-prefer-arrow": "^1.2.2",
|
|
48
49
|
"handlebars": "^4.7.7",
|
|
49
50
|
"jest": "^26.6.3",
|
|
51
|
+
"json-schema": "^0.4.0",
|
|
50
52
|
"mocha": "^9.0.0",
|
|
51
53
|
"nodemon": "^2.0.6",
|
|
52
54
|
"ts-jest": "^26.4.4",
|