0.3.1 • Published 1 year ago

cucumber-reportify v0.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Cucumber Reportify

npm version Build Status License: MIT

A performance optimized static HTML report generator for Cucumber test results.

Installation

You can install the library using npm:

npm install cucumber-reportify

Or using yarn:

yarn add cucumber-reportify

Usage

You can run cucumber-reportify via the CLI:

cuke -i=path/to/reports/ -o=path/to/output/

CLI Options

OptionDescription
-i, --inputPath to a JSON report or a directory containing JSON reports.
-o, --outputPath where the generated report should be saved.
-v, --verboseIncrease logging verbosity to debug mode.
-t, --themeReport theme, can be any of the DaisyUI supported themes: https://daisyui.com/docs/themes/
-n, --app-nameApplication name to be displayed on the report.
-f, --show-failedShow only failed features/scenarios on initial page load.

API

You can also render a report through code:

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,
});

Serving Locally

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 -g
    • http-server
  • Python's built in http.server package:
    • python3 -m http.server 8080
    • Or Python 2: python -m SimpleHTTPServer 8080
  • Ruby's WEBrick HTTP server:
    • ruby -run -ehttpd . -p8000

Performance Testing

GitHub pages deployment of the static content generated by this package with dummy data:

  • 230003 scenarios (2 failed scenarios)
  • 50000 features
  • 5000 screenshots

Performance Test

Contributing

Since this project is in pre-release and I'm not expecting it to blow out either, I am currently making direct changes to /master.

However, contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.3.0

1 year ago

0.3.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago