npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cucumber-json-2-pdf

v1.0.36

Published

Welcome to the `cucumber-json-2-pdf` project!

Readme

README

Welcome to the cucumber-json-2-pdf project!

Description

This project aims to generate PDF reports based on data analysis.

Installation

To install the necessary dependencies, run the following command:

npm install -g cucumber-json-2-pdf

Usage

Convert Cucumber JSON to PDF

cucumber-json-2-pdf convert -j examples/cucumber-data.json -o output -p Android-Sanity -e DEovan -n Teste -m [email protected] -l images/logo.png -t "DET - Documento de Evidência de Testes"

Convert JUnit XML to PDF

cucumber-json-2-pdf convert-junit -i examples/sample-junit.xml -o output -p Android-Sanity -e DEovan -n Teste -m [email protected] -l images/logo.png -t "DET - Documento de Evidência de Testes"

Convert JUnit XML to PDF (API JSON modes)

Compact mode (default):

cucumber-json-2-pdf convert-junit -i examples/results-img.xml -o output -p API-Sanity -e DEovan --api-json-mode compact

Full mode:

cucumber-json-2-pdf convert-junit -i examples/results-img.xml -o output -p API-Sanity -e DEovan --api-json-mode full

No JSON evidence:

cucumber-json-2-pdf convert-junit -i examples/results-img.xml -o output -p API-Sanity -e DEovan --api-json-mode none

Single merged PDF (summary + all evidences)

Generated by default. After every scenario PDF is written, a consolidated PDF is produced containing a summary page (general data, stat tiles, pass/fail donut, Quality Health and a scenario index) followed by every scenario PDF, in order:

cucumber-json-2-pdf convert-junit -i examples/junit-retry.xml -o output -p Android-Sanity -e DEovan -l images/logo.png

Use --no-merge to skip it and keep only the individual scenario PDFs:

cucumber-json-2-pdf convert-junit -i examples/junit-retry.xml -o output -p Android-Sanity -e DEovan --no-merge

--merge-only produces just the consolidated file and removes the individual scenario PDFs:

cucumber-json-2-pdf convert -j examples/cucumber.json -o output -p Android-Sanity -e DEovan --merge-only --merged-name DET-Sanity.pdf --partner "Fornecedor Exemplo" --objective "Validar as operações do serviço." --observations "Falhas conhecidas em homologação."

When --observations is omitted, the summary lists the failing scenarios automatically.

Commands

convert — Cucumber JSON

Usage: cucumber-json-2-pdf convert [options]

Options:
  -j, --json <path>       Path to the Cucumber JSON file (required)
  -o, --output <dir>      Output directory for the PDFs (required)
  -p, --project <name>    Project name (required)
  -e, --execution <name>  Execution responsible (required)
  -n, --owner <name>      Owner name
  -m, --email <email>     Owner email
  -x, --debug             Output extra debugging
  -l, --logo <path>       Path to the logo image
  -t, --title <text>      Title on header
  --merge                 Generate the consolidated PDF with a summary page (default)
  --no-merge              Skip the consolidated PDF, keeping only the individual PDFs
  --merge-only            Generate only the merged PDF (removes the individual PDFs)
  --merged-name <name>    File name of the merged PDF
  --objective <text>      Test objective shown on the summary page
  --observations <text>   Observations shown on the summary page
  --partner <name>        Partner shown on the summary page
  -h, --help              Display help for command

convert-junit — JUnit XML

Usage: cucumber-json-2-pdf convert-junit [options]

Options:
  -i, --input <path>      Path to the JUnit XML file (required)
  -o, --output <dir>      Output directory for the PDFs (required)
  -p, --project <name>    Project name (required)
  -e, --execution <name>  Execution responsible (required)
  -n, --owner <name>      Owner name
  -m, --email <email>     Owner email
  -x, --debug             Output extra debugging
  -l, --logo <path>       Path to the logo image
  --api-json-mode <mode>  JSON evidence mode for API reports: compact|full|none
  -t, --title <text>      Title on header
  --merge                 Generate the consolidated PDF with a summary page (default)
  --no-merge              Skip the consolidated PDF, keeping only the individual PDFs
  --merge-only            Generate only the merged PDF (removes the individual PDFs)
  --merged-name <name>    File name of the merged PDF
  --objective <text>      Test objective shown on the summary page
  --observations <text>   Observations shown on the summary page
  --partner <name>        Partner shown on the summary page
  -h, --help              Display help for command

Environment variables

DET_API_JSON_MODE

Controls JSON evidence rendering for JUnit API reports. Values:

  • compact (default)
  • full
  • none

Examples:

DET_API_JSON_MODE=full cucumber-json-2-pdf convert-junit -i examples/results-img.xml -o output -p API-Sanity -e DEovan

DET_API_JSON_COMPACT_LIMIT

Controls the max JSON length used in compact mode.

  • Default: 2000
  • Must be a positive integer

Example:

DET_API_JSON_COMPACT_LIMIT=350 cucumber-json-2-pdf convert-junit -i examples/results-img.xml -o output -p API-Sanity -e DEovan --api-json-mode compact

Output

Each scenario generates a separate PDF file named:

DET-{ScenarioName}-{passed|failed}.pdf

Unless --no-merge is passed, a consolidated PDF is also written:

DET-{ProjectName}-consolidado.pdf

Its first page(s) hold the execution summary — general data, total/duration/passed/failed tiles, a pass-rate donut with PASS/FAIL/SKIP/ERROR legend, the Quality Health rating (>= 90% GREEN,

= 80% YELLOW, below that RED), observations and the scenario index — followed by every scenario PDF with continuous page numbering in the bottom-left corner.

License

This project is licensed under the ISC License