cucumber-reactive-reporter 1.0.1 → 1.0.2
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 +31 -11
- package/package.json +2 -2
- package/dist/react/cucumber-results.json +0 -2786
package/README.md
CHANGED
|
@@ -4,30 +4,50 @@
|
|
|
4
4
|
Parses output of cucumberjs
|
|
5
5
|
provides filtering via tags ans status and few other things.</b>
|
|
6
6
|
<br>
|
|
7
|
-
|
|
7
|
+
### Why another reporter? ###
|
|
8
|
+
<b>I have made a somewhat odd choice of using cucumberjs for microservice API testing, unlike the usual application of testing UIs.
|
|
9
|
+
Because validation was centered on various data, i quickly ran into limitations of existing reporters with data attachments.
|
|
10
|
+
These are the things that were important to me that i tried to implement in this reporter:
|
|
11
|
+
</b>
|
|
12
|
+
|
|
13
|
+
* Control over how data is displayed, including the ability to pass html snippets as attachments and render them in the reporter: (can be useful when pointing to "local" files generated as part of the test run)
|
|
14
|
+
* Ability to filter and search the reports based on such things like status and tags
|
|
15
|
+
* Ability to work with large-ish amounts of tests, some existing reports become unwieldy or slow
|
|
16
|
+
* Control filter and search configuration with url params, allows sharing a preconfigured link in case you want to share a specific failure for example.
|
|
17
|
+
|
|
8
18
|
</p>
|
|
9
19
|
|
|
10
20
|
## Install
|
|
11
21
|
|
|
12
22
|
```shell
|
|
13
|
-
$ npm install
|
|
23
|
+
$ npm install cucumber-reactive-reporter
|
|
14
24
|
```
|
|
15
25
|
## Example usage:
|
|
16
26
|
|
|
17
27
|
```js
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
let meta = { //there will be a metadata section in the report that will display your key value pairs for posterity
|
|
23
|
-
"key1": "value1",
|
|
24
|
-
"fizz: "buzz"
|
|
28
|
+
import Reporter from "cucumber-reactive-reporter";
|
|
29
|
+
let options = {
|
|
30
|
+
"title": "Cucumber reactive reporter sample",
|
|
31
|
+
"description": "... test suite description"
|
|
25
32
|
};
|
|
26
|
-
|
|
33
|
+
let metadata = {
|
|
34
|
+
"some key": "value",
|
|
35
|
+
"additional key": "value",
|
|
36
|
+
"more keys": "value"
|
|
37
|
+
};
|
|
38
|
+
options.metadata = metadata;
|
|
39
|
+
(async () => {
|
|
40
|
+
await Reporter.generate("public/cucumber-results.json", "test/", options);
|
|
41
|
+
})();
|
|
27
42
|
```
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
### See sample in action:
|
|
30
45
|
[link](https://unsuspecting-noob.github.io/cucumber-reactive-reporter/index.html)
|
|
46
|
+
|
|
47
|
+
* @TAGS button displays a list of every tag found in the report
|
|
48
|
+
* METADATA button opens a section with any custom key value pairs passed in during creating of the report
|
|
49
|
+
* Search window allows for cucumber expressions to filter down to features with scenarios matching the expression, for example:
|
|
50
|
+
* ```(@catfacts or @image) and not @1_tag```
|
|
31
51
|
## TODOs and ideas for improvement:
|
|
32
52
|
|
|
33
53
|
1. consider adding hooks for linking to jira the way allure does it:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cucumber-reactive-reporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A filterable html report generator for cucumberjs written in react",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/unsuspecting-noob/cucumber-reactive-reporter",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"keywords": ["cucumber", "cucumberjs", "html", "report", "reporter"],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"start": "react-scripts start",
|
|
14
|
+
"start": "PUBLIC_URL=./ react-scripts start",
|
|
15
15
|
"build": "rollup -c",
|
|
16
16
|
"prebuildreact": "rm -rf build && rm -rf react",
|
|
17
17
|
"buildreact": "react-scripts build && npm run build",
|