Project

nxgreport

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Generate a beautiful emailable test report.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme
NxgReport

NxgReport

Beautiful, zero-dependency test reports for Ruby

Generate stunning, self-contained HTML test reports that you can share, email, or host anywhere.
No server required — just a single .html file.

Gem Version  CI  License  Ruby Version



Screenshots  •  Quick Start  •  Features  •  API  •  Cucumber  •  Contributing


Screenshots

Light Mode

NxgReport Light Mode

NxgReport Light Detail

Dark Mode

NxgReport Dark Mode

NxgReport Dark Detail

Features

Self-contained HTML Single .html file with all CSS & JS inlined — no external dependencies at runtime
Light & Dark mode Auto-detects system preference, with a manual toggle
Interactive dashboard Health banner, stat cards, pass-rate progress bars, and feature cards
Charts Donut chart for pass/fail breakdown, line chart for tests by tag
Tag filtering Tag your tests (smoke, critical, regression, etc.) and filter interactively
Test detail modal Click any feature card to see individual test results, execution times, and error messages
Metadata bar Display release name, device, OS, app version, environment, and execution time
E-mailable Works in any browser — share via email, Slack, or host as a static page
Zero dependencies Pure Ruby gem with no runtime dependencies

Quick Start

Install

gem install nxgreport

Or add to your Gemfile:

gem 'nxgreport'

Generate a report

require 'nxgreport'

# Configure
$NxgReport.setup(location: "./TestReport.html", title: "My Test Suite")
$NxgReport.set_device(name: "iPhone 16 Pro")
$NxgReport.set_os(name: "iOS 18.2")
$NxgReport.set_release(name: "Sprint 47")
$NxgReport.set_app_version(no: "3.2.0")
$NxgReport.set_environment(name: "Staging")

# Log tests
$NxgReport.log_test(
  feature_name: "Login",
  test_name: "User can login with valid credentials",
  test_status: "Pass",
  comments: "Success",
  tag: "smoke",
  execution_time: 3.2
)

$NxgReport.log_test(
  feature_name: "Login",
  test_name: "Biometric authentication",
  test_status: "Fail",
  comments: "TouchID prompt not displayed on simulator",
  tag: "critical",
  execution_time: 5.4
)

# Build the report
$NxgReport.build()

That's it — open the generated .html file in any browser.


API Reference

Setup

Method Description
$NxgReport.setup(location:, title:) Set the output file path and report title
$NxgReport.set_device(name:) Device under test (e.g. "iPhone 16 Pro")
$NxgReport.set_os(name:) OS version (e.g. "iOS 18.2")
$NxgReport.set_release(name:) Release or sprint name
$NxgReport.set_app_version(no:) Application version number
$NxgReport.set_environment(name:) Test environment (e.g. "Staging", "QA")
$NxgReport.set_execution(date:) Custom execution date (defaults to today)
$NxgReport.open_upon_execution(value:) Auto-open report in browser after build

Logging tests

$NxgReport.log_test(
  feature_name: "Feature Name",    # Required — groups tests under a feature card
  test_name: "Test description",   # Required — name of the individual test
  test_status: "Pass",             # Required — "Pass" or "Fail"
  comments: "Error details",       # Optional — shown in the detail modal
  tag: "smoke",                    # Optional — used for tag filtering & charts
  execution_time: 3.2              # Optional — in seconds (auto-calculated if omitted)
)

Building

$NxgReport.build()  # Generates the HTML report file

Cucumber Integration

env.rb — setup the report:

require 'nxgreport'

$NxgReport.setup(location: "./reports/CucumberReport.html", title: "Cucumber Results")
$NxgReport.set_device(name: "iPhone 16 Pro")
$NxgReport.set_os(name: "iOS 18.2")
$NxgReport.set_environment(name: "QA")

hooks.rb — log each scenario automatically:

After do |scenario|
  $NxgReport.log_test(
    feature_name: scenario.feature.name,
    test_name: scenario.name,
    test_status: scenario.failed? ? "Fail" : "Pass",
    comments: scenario.exception&.message || "Success",
    tag: "cucumber"
  )
end

at_exit do
  $NxgReport.build()
end

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin my-feature)
  5. Open a Pull Request

Support the project

If you find NxgReport useful, consider supporting its development:

Buy Me A Coffee


License

MIT © Balabharathi Jayaraman