Skip to main content

Universal JUnit XML to self-contained offline HTML test reporter. Works with pytest, Playwright, Maven, Jest, Cypress, Robot Framework.

Project description

UniReport — Universal Test Reporter

PyPI npm Maven Central License: MIT Tests

One install. Any language. Beautiful reports. Zero server.

UniReport turns any JUnit XML into a stunning, self-contained HTML dashboard — automatically after every test run. No upload. No internet required. 100% offline.


Install

pip install unireport                          # Python
npm install unireport --save-dev               # Node.js
# Java: dev.unireport:unireport:2.0.0 in pom.xml

Quickstart

Python (pytest)

# pytest.ini
[pytest]
unireport_title   = My Project
unireport_output  = reports
unireport_history = reports/.history
pytest tests/
# → reports/unireport.html  ✓

Node.js

{ "scripts": { "posttest": "unireport generate junit.xml ./reports" } }
npm test
# → reports/unireport.html  ✓

Java

UniReport.generate("target/surefire-reports", "target/unireport");
mvn test
# → target/unireport/unireport.html  ✓

Report Features

Metrics & KPIs

  • 12 KPI cards — Total, Passed, Failed, Errors, Skipped, Retry Count, Pass Rate, Avg Test Time, Total Duration, Stability Score (0–100), Flaky %, Failure Reproducibility
  • Risk badge — STABLE / UNSTABLE / HIGH RISK
  • Pass rate visual bar with exact counts

Test Details

  • Expandable suite tree with per-test tabs: Error, Steps, Logs, Console, Attachments, stderr, Info
  • Run history dots — last 5 statuses (🟢🔴🟡) per test
  • FLAKY badge — auto-detected vs previous run
  • Live search + filter by status (All / Passed / Failed / Skipped / Flaky)

Visual Analysis

  • Result Heatmap — test × spec file grid, colour-coded by status
  • Mind Map (sidebar) — Root → Suite → Describe → Test, always visible, collapsible
  • Individual Test History Cards — one card per test, mini bar chart (last 15 runs) + collapsible run table
  • Failure Analysis — auto-classified: Assertion / Timeout / Network / Script

Charts (10 total)

Pass/Fail donut · Duration histogram · Test Volume & Outcome Trends (line) · Execution Duration Trends (area) · Duration by Spec File (bar) · Duration by Describe Block (stacked column) · Worker Distribution (bar) · Browser Distribution (pie) · Top 10 Slowest · Suite Health

History & Trends

  • Auto-saved to .history/ — up to 30 runs, ~3 KB each
  • Pass rate trend line + run breakdown bar
  • Commit .history/ to git for team-wide trends

Environment Detection

  • Local / CI / Sharded environment display
  • Worker count, browser list, framework auto-detection

Export

  • Download as HTML, CSV, JSON, or lightweight Email HTML summary

Configuration Reference

Python

Key CLI flag Default Description
unireport_title --unireport-title XML filename Report title
unireport_output --unireport-output unireport-output Output folder
unireport_history --unireport-history <output>/.history History folder
unireport_xml --unireport-xml .unireport_junit.xml XML path
unireport_open --unireport-open false Auto-open browser
unireport_disable --unireport-disable false Skip generation

Node.js CLI

unireport generate <xml> [output] [--title text] [--history dir] [--open]
unireport clear-history [dir]
unireport info / --version

Java API

UniReport.builder()
    .xmlPath("target/surefire-reports")
    .outputDir("target/unireport")
    .historyDir("target/unireport/.history")
    .title("My Suite")
    .openBrowser(false)
    .generate();

Embedding Attachments

# Python
import base64
b64 = base64.b64encode(page.screenshot()).decode()
print(f"[[ATTACHMENT|screenshot.png|{b64}]]")
// Node.js
const b64 = (await page.screenshot()).toString('base64');
process.stdout.write(`[[ATTACHMENT|screenshot.png|${b64}]]\n`);
// Java
byte[] shot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
System.out.println("[[ATTACHMENT|screenshot.png|" + Base64.getEncoder().encodeToString(shot) + "]]");

Architecture — One Change, All Platforms

core/src/template.html   ← ALL UI (edit this to change the report)
core/src/parser.js       ← JUnit XML parser
core/src/history.js      ← History + email
        ↓
node scripts/build.js    ← Compiles to all 3 platforms
        ↓
packages/pip/            → PyPI
packages/npm/            → npmjs.com
packages/maven/          → Maven Central

Making changes:

# Edit core/src/template.html (or parser.js / history.js)
node scripts/build.js          # rebuild all platforms
node scripts/build.js --verify # rebuild + run 24 self-tests

Publishing

node scripts/build.js                   # build all 3
npm run publish:pip                     # → PyPI
npm run publish:npm                     # → npmjs.com
cd packages/maven && mvn deploy         # → Maven Central

Supported Frameworks

pytest · Playwright · Robot Framework · Jest · Cypress · Mocha · JUnit 5 · TestNG · Maven Surefire · Gradle · RSpec · PHPUnit · gotestsum · xUnit · NUnit · and any tool that outputs JUnit XML.


License

MIT © UniReport Contributors


Keywords: junit xml report generator, html test report, pytest html report, playwright test report, jest html reporter, cypress report, allure alternative, extent report alternative, offline html test report, self-contained test report, CI test dashboard, test history tracking, flaky test detection, test automation reporting, java test report, python test report, junit 5 report, maven surefire report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

velvet_report-2.0.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velvet_report-2.0.0-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

Details for the file velvet_report-2.0.0.tar.gz.

File metadata

  • Download URL: velvet_report-2.0.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for velvet_report-2.0.0.tar.gz
Algorithm Hash digest
SHA256 043ad1a7fa1b46141354ba3f7f2d865b1a946e40c9dd5e214eb8882857960e65
MD5 aac0496b13d57f04e1015c2666038b89
BLAKE2b-256 534677c8f3ad628077883baddef2b36ab6a09ebf94f4c6c2acfd3ddd045c3d7b

See more details on using hashes here.

File details

Details for the file velvet_report-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: velvet_report-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for velvet_report-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a0823e6ea0fb9921d1105be5363b352e4d69c9721ed3bea0f82dded2d88212b
MD5 f4cc0a090de427893eab3c4c02003a71
BLAKE2b-256 e69e2a5cf193b5d0f2adfcba98a32716d7b8a8b10a0d23ec96a0233b3e6915d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page