HTML reports for Cucumber test results
npm install cucumber-reporting


A performance optimized static HTML report generator for Cucumber test results.
You can install the library using npm:
``bash`
npm install cucumber-reporting
Or using yarn:
`bash`
yarn add cucumber-reporting
You can run cucumber-reporting via the CLI:
`bash`
cuke -i=path/to/reports/ -o=path/to/output/
| Option | Description |
| --- | --- |
| -i, --input | Path to a JSON report or a directory containing JSON reports. |-o, --output
| | Path where the generated report should be saved. |-v, --verbose
| | Increase logging verbosity to debug mode. |-t, --theme
| | Report theme, can be any of the DaisyUI supported themes: https://daisyui.com/docs/themes/ |-n, --app-name
| | Application name to be displayed on the report. |-f, --show-failed
| | Show only failed features/scenarios on initial page load. |
You can also render a report through code:
`typescript`
renderReport(reportPath, {
// Path where the generated report should be saved
outPath: "out",
// Report theme
theme: "dark",
// Application name
appName: "My App",
// Show only failed features/scenarios on initial page load
showFailed: true,
// Increase logging verbosity to debug mode
verbose: true,
});
The JS scripts loaded into the HTML uses fetch(), which won't work off a local file system and will require a HTTP server.
There are many fast ways to spin up a HTTP server. Examples include:
- The http-server npm package:
- npm install http-server -ghttp-server
- http.server
- Python's built in package:python3 -m http.server 8080
- python -m SimpleHTTPServer 8080
- Or Python 2: ruby -run -ehttpd . -p8000
- Ruby's WEBrick HTTP server:
-
GitHub pages deployment of the static content generated by this package with dummy data:
Since this project is in pre-release and I'm not expecting it to blow out either, I am sometimes make direct changes to /master`.
However, contributions are welcome!