newman-reporter-allure 3.0.4 → 3.0.6

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.
Files changed (2) hide show
  1. package/README.md +36 -69
  2. package/package.json +11 -8
package/README.md CHANGED
@@ -12,100 +12,67 @@
12
12
 
13
13
  ---
14
14
 
15
- ## Installation
16
-
17
- ```console
18
- $ npm install -g newman-reporter-allure
19
- ```
20
-
21
- ## Usage
22
-
23
- To generate Allure results, specify `allure` in Newman's `-r` or `--reporters` option.
15
+ ## The documentation and examples
24
16
 
25
- ```console
26
- $ newman run <Collection> -e <Environment> -r allure
27
- $ newman run <Collection> -e <Environment> -r allure --reporter-allure-resultsDir <allure-results-out-dir>
28
- ```
29
-
30
- Use the option `--reporter-allure-collection-as-parent-suite` to use the collection name as the parent suite title under the _Suites_ view. This helps when you run multiple collections and want to aggregate them in a single report.
31
-
32
- ## Metadata
17
+ The docs for Allure Newman are available at [https://allurereport.org/docs/newman/](https://allurereport.org/docs/newman/).
33
18
 
34
- You can add allure labels by passing javascript comments in the test field of postman request declaration
19
+ Also, check out the examples at [github.com/allure-examples](https://github.com/orgs/allure-examples/repositories?q=visibility%3Apublic+archived%3Afalse+topic%3Aexample+topic%3Anewman).
35
20
 
36
- ### Id
21
+ ## Installation
37
22
 
38
- ```javascript
39
- // @allure.id=228
23
+ Install `newman-reporter-allure` using a package manager of your choice. For example:
40
24
 
41
- pm.test("Status code is 200", function () {
42
- pm.response.to.be.ok;
43
- });
25
+ ```shell
26
+ npm install -D newman-reporter-allure
44
27
  ```
45
28
 
46
- ### Label
29
+ ## Usage
47
30
 
48
- ```javascript
49
- // @allure.label.{{labelName}}={{labelValue}}
31
+ Enable the `allure` reporter via the CLI:
50
32
 
51
- pm.test("Status code is 200", function () {
52
- pm.response.to.be.ok;
53
- });
33
+ ```shell
34
+ $ newman run "<Collection>" -e "<Environment>" -r allure
54
35
  ```
55
36
 
56
- ### Story
57
-
58
- ```javascript
59
- // @allure.label.story=storyName
37
+ You may combine `allure` with other reporters:
60
38
 
61
- pm.test("Status code is 200", function () {
62
- pm.response.to.be.ok;
63
- });
39
+ ```shell
40
+ $ newman run "<Collection>" -e "<Environment>" -r cli,allure
64
41
  ```
65
42
 
66
- ### Suite
43
+ When the test run completes, the result files will be generated in the `./allure-results` directory.
67
44
 
68
- ```javascript
69
- // @allure.label.suite=suiteName
45
+ You may select another location, or further customize the reporter's behavior with [the configuration options](https://allurereport.org/docs/newman-configuration/).
70
46
 
71
- pm.test("Status code is 200", function () {
72
- pm.response.to.be.ok;
73
- });
74
- ```
47
+ ### View the report
75
48
 
76
- ### Owner
49
+ > You need Allure Report to be installed on your machine to generate and open the report from the result files. See the [installation instructions](https://allurereport.org/docs/install/) on how to get it.
77
50
 
78
- ```javascript
79
- // @allure.label.owner=ownerName
51
+ Generate Allure Report after the tests are executed:
80
52
 
81
- pm.test("Status code is 200", function () {
82
- pm.response.to.be.ok;
83
- });
53
+ ```bash
54
+ allure generate ./allure-results -o ./allure-report
84
55
  ```
85
56
 
86
- ### Tag
57
+ Open the generated report:
87
58
 
88
- ```javascript
89
- // @allure.label.tag=tagName
90
-
91
- pm.test("Status code is 200", function () {
92
- pm.response.to.be.ok;
93
- });
59
+ ```bash
60
+ allure open ./allure-report
94
61
  ```
95
62
 
96
- ## Generating and Serving Allure report
97
-
98
- Allure results will be generated under folder "allure-results" in the root location.
99
- Use allure-commandline to serve the report locally.
63
+ ## Allure API
100
64
 
101
- ```console
102
- $ allure serve
103
- ```
104
-
105
- Generate the static report web-application folder using allure-commandline
65
+ Enhance the report by utilizing the Allure API:
106
66
 
107
- ```console
108
- $ allure generate --clean
67
+ ```js
68
+ // @allure.label.epic:Authorization
69
+ // @allure.label.feature:BearerAuthorization
70
+ // @allure.label.story:ValidBearerToken
71
+ // @allure.label.tag:api
72
+ // @allure.label.owner:eroshenkoam
73
+ pm.test("Test Authentication", function () {
74
+ // ...
75
+ });
109
76
  ```
110
77
 
111
- Report will be generated under folder "allure-report" in the root location.
78
+ More details about the API are available at [https://allurereport.org/docs/newman-reference/](https://allurereport.org/docs/newman-reference/).
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "newman-reporter-allure",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "Allure Newman integration",
5
5
  "keywords": [
6
6
  "allure",
7
7
  "newman",
8
- "reporter",
9
- "reports",
10
- "api",
11
8
  "postman",
12
- "tests"
9
+ "api",
10
+ "html",
11
+ "test",
12
+ "report",
13
+ "reporter",
14
+ "testing",
15
+ "testops"
13
16
  ],
14
17
  "homepage": "https://allurereport.org/",
15
18
  "repository": {
@@ -50,7 +53,7 @@
50
53
  "test": "ALLURE_TEST_MODE=1 ALLURE_LABEL_A=a ALLURE_LABEL_B=b vitest run"
51
54
  },
52
55
  "dependencies": {
53
- "allure-js-commons": "3.0.4"
56
+ "allure-js-commons": "3.0.6"
54
57
  },
55
58
  "devDependencies": {
56
59
  "@babel/cli": "^7.24.6",
@@ -67,7 +70,7 @@
67
70
  "@typescript-eslint/eslint-plugin": "^8.0.0",
68
71
  "@typescript-eslint/parser": "^8.0.0",
69
72
  "allure-commandline": "^2.29.0",
70
- "allure-vitest": "3.0.4",
73
+ "allure-vitest": "3.0.6",
71
74
  "babel-plugin-add-module-exports": "^1.0.4",
72
75
  "eslint": "^8.57.0",
73
76
  "eslint-config-prettier": "^9.1.0",
@@ -78,7 +81,7 @@
78
81
  "eslint-plugin-prefer-arrow": "^1.2.3",
79
82
  "msw": "1",
80
83
  "newman": "^6.2.1",
81
- "npm-run-all2": "^6.1.2",
84
+ "npm-run-all2": "^7.0.0",
82
85
  "postman-collection": "^4.2.1",
83
86
  "rimraf": "^6.0.0",
84
87
  "typescript": "^5.2.2",