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

junit-html-reporter

v1.0.5

Published

Convert JUnit/TestNG XML reports into readable HTML reports.

Downloads

23

Readme

Here's a complete README.md for your junit-html-reporter npm package:


📊 JUnit HTML Reporter

Convert JUnit or TestNG XML reports into a clean, easy-to-read HTML report. Supports test exclusions, custom report titles, and provides a summary of passed, failed, and skipped tests.


🚀 Features

  • ✅ Converts JUnit or TestNG XML files into an embeddable HTML report.
  • 📋 Displays an overall summary with total passed, failed, and skipped tests.
  • 📂 Suite-wise breakdown of test cases with results and execution duration.
  • 🛑 Excludes specified test cases automatically.
  • 🔍 Automatically skips empty suites and test cases from the report.
  • 🎨 Responsive, email-friendly HTML template.

📦 Installation

npm install -g junit-html-reporter

🛠️ Usage

junit-html-reporter <xml-path> <report-title> [output-path] [excluded-tests]

Parameters:

  • <xml-path> → Path to the input JUnit or TestNG XML file.
  • <report-title> → Custom title for the HTML report.
  • [output-path] → (Optional) Path to save the generated HTML report. Defaults to report.html.
  • [excluded-tests] → (Optional) Comma-separated list of test names to exclude.

Example Command

junit-html-reporter ./results/report.xml "My Custom Test Report" ./output/report.html "RepeatedTest1,Test2ToExclude"
  • Generates a report titled "My Custom Test Report".
  • Excludes tests named RepeatedTest1 and Test2ToExclude from the report.
  • Saves the output to ./output/report.html.

📋 Sample Report Structure

  • Overall Summary:

    • ✔ Passed: Total number of passed tests.
    • ❌ Failed: Total number of failed tests.
    • ⚠ Skipped: Total number of skipped tests.
  • Suite-wise Breakdown:

    • Displays suite names and corresponding test case details.
    • Test case details include:
      • Test name
      • Status (Passed, Failed, Skipped)
      • Execution duration

🎨 Custom HTML Template

You can customize the HTML output by modifying the templates/reportTemplate.html file.


🐞 Handling Empty Suites & Tests

  • Automatically excludes empty suites and test cases from the report and the overall count.
  • Prevents clutter and ensures the report reflects only relevant information.

🔧 Development & Contributions

  1. Clone the repository:

    git clone https://github.com/your-username/junit-html-reporter.git
    cd junit-html-reporter
  2. Install dependencies:

    npm install
  3. Run the script locally:

    node ./bin/index.js ./results/report.xml "Local Test Report" ./output/report.html
  4. Submit a pull request for any improvements! 🚀


📄 License

This project is licensed under the MIT License.


🙏 Credits

Developed by Your Name 🚀


Let me know if you need any adjustments for the documentation! 🚀