1.0.11 • Published 2 years ago

cucumber-reactive-reporter v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

#StandWithUkraine

Cucumber report library based on react-redux and @mui Parses output of cucumberjs provides filtering via tags ans status and few other things.

Why another reporter?

The main motivation behind this project was the desire for a more dynamic experience as well as the need to get more control over various data attachments and how they are displayed.

Here are some of the things that were deemed important to implement in this reporter:

  • 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)
  • Ability to filter and search the reports based on such things like status and tags
  • Ability to work with large-ish amounts of tests, some existing reports become unwieldy or slow
  • Control filter and search configuration with url params, allows sharing a preconfigured link in case you want to share a specific failure for example.
  • Better use available space on the report page (needs tweaking)

Install

$ npm install cucumber-reactive-reporter

Example usage:

import Reporter from "cucumber-reactive-reporter";
let options = {
    "title": "Cucumber reactive reporter sample",
    "description": "... test suite description"
};
let metadata = {
    "some key": "value",
    "additional key": "value",
    "more keys": "value"
};
let linkTags = [{
         "pattern": "[a-zA-Z]*-(\\d)*$",
         "link": "https://my.jira.server/browse/"
    }];
options.metadata = metadata;
options.linkTags = linkTags;
(async () => {
    await Reporter.generate("mytest/cucumber-output.json", "htmlOutputFolder/", options);
})();

See sample in action:

link

  • @TAGS button displays a list of every tag found in the report
  • METADATA button opens a section with any custom key value pairs passed in during creating of the report
  • Search window allows for cucumber expressions to filter down to features with scenarios matching the expression, for example:
    • (@catfacts or @image) and not @1_tag

TODOs and ideas for improvement:

  1. patch more settings for intial render (before/after toggle, theme, filter etc.)
  2. handle state "ambiguous" (probably lump em with errors), generate one when there are two test definitions with similar regex
  3. Figure out a strategy for handling combined reports (from parallel runs)

Release notes

VersionDescription
1.0.2improvements to debugging and readme
1.0.3fixed crashes when search threw syntax errorsfixed css for @tags and @metadata buttons
1.0.4Added more pagination choices for scenariosList, 50 and 100
1.0.5Fixing publishing code and adding notes
1.0.6Added pagination to the main feature screen, shows up if above 50
1.0.7Changed feature pagination to be always on if above 10 elements, the reason why is you can change to display 10 at a time to force single column
1.0.8Fixed json parsing error for newer cucumber version, where Before and After steps do not provide code line info
1.0.9Fixed displayed step duration in newer versions of cucumber
1.0.10New reporter option to convert some tags to custom links
1.0.9

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago