VelvetReport — Universal JUnit XML to Offline HTML Test Reporter
🚀 Live Interactive Demo: Experience the full kinetic dashboard online at vreport.in/demo.html!
VelvetReport is a zero-dependency, self-contained, 100% offline HTML test reporting engine. It converts standard JUnit XML output into an interactive, single-file dashboard with historical trend tracking, flaky test detection, execution timelines, and failure analytics. Built as a lightweight, zero-server alternative to Allure Report and ExtentReports across Python, Node.js, and Java.
⚡ 10-Second Quickstart
Python (pytest — Zero Config):
pip install velvet-report
pytest # Report auto-generated at reports/velvetreport.html with zero config!
Node.js (npx — Zero Install):
npx velvet-report generate reports/results.xml ./reports --open
Java (Maven):
<dependency>
<groupId>dev.velvetreport</groupId>
<artifactId>velvet-report</artifactId>
<version>2.1.5</version>
</dependency>
🥊 Why VelvetReport? (Comparison Matrix)
| Feature | VelvetReport (v2.1.5) | Allure Report | pytest-html / Mochawesome |
|---|---|---|---|
| 100% Offline (No CDN/Internet) | ✅ Single file, zero network calls | ⚠️ Requires Java runtime / HTTP server | ✅ Single static file |
| Zero Server / Zero Setup | ✅ Double-click file to open in browser | ❌ Requires allure serve or cloud host |
✅ Static file |
| Zero Runtime Dependencies | ✅ 0 dependencies | ❌ Heavy CLI / JVM setup | ⚠️ Multiple packages |
| Historical Trends & Flaky Tracking | ✅ Auto-saved in .history/ (~3 KB/run) |
⚠️ Needs Allure Server / DB | ❌ None |
| Pytest Auto-Capture | ✅ Environment, fixtures, xdist, tags | ⚠️ Requires manual decorators | ⚠️ Limited |
| Interactive Test Details Drawer | ✅ Summary, Traces, Steps, Screenshots | ✅ Supported | ⚠️ Limited |
| Multi-Framework Parity | ✅ Python, Node.js, Java | ⚠️ Framework-specific adapters | ❌ Single framework |
| Failure Classification | ✅ Auto-detects Assertion / Timeout / Network | ⚠️ Manual classification | ❌ None |
🚀 Key Highlights (v2.1.5)
- ⏱ Step Timing & Bottleneck Intelligence: Automatically parses individual step durations (
1.2s,450ms) from test logs and spotlights the slowest step (⚡ BOTTLENECK) with runtime share percentage. - 🎭 Playwright Trace 1-Click Launcher: Native detection of
trace.zip/ trace directories with 1-click launch totrace.playwright.devand CLI reproduction commands (npx playwright show-trace). - 🔗 Cascading Failure & Dependency Intelligence: Automatically flags downstream tests blocked by setup/fixture failures (
🔗 Cascading Failure), isolating true root causes. - 🌐 Failed Network & HTTP Calls Spotlight: Extracts 4xx/5xx HTTP status codes, endpoints, and latency directly from logs into failure cards and drawer badges.
- 🐞 1-Click Issue Filer (GitHub & Jira): Generates pre-populated bug reports in GitHub Markdown or Jira Wiki Markup with complete reproduction steps, timings, and attachments.
- 📴 100% Offline & Self-Contained: One single standalone
.htmlfile. Inlines all CSS, JS, charts, and base64 screenshots. Zero external network calls or CDNs. - ⚡ Zero-Config Pytest Auto-Capture: Automatically captures OS, Python runtime, browser environment tooltips, CI pipeline variables, git commit/branch, marks, setup/call/teardown phase timings, fixture overheads, and xdist parallel worker distribution.
- 🌐 Deep HTTP & API Calls Inspector: Automatically detects REST/HTTP requests in test logs. Provides 1-click cURL reproductions, formatted multi-line JSON payload extraction (handling single-quoted Python dicts & raw bodies), status codes, latency, and full request/response inspection modals.
- 🧠 Interactive Centered-Docking MindMap & Tree Explorer: Starts centered in the viewport and smoothly glides to dock on the left edge as child suites expand. Features responsive full-height viewport sizing with zero dead space, keyboard shortcuts (
+,-,0,f), and high-density MM Tree Explorer. - 🔁 Dual-Log Flaky Test Inspector: For tests with the
b-flakybadge, cleanly isolates ❌ FAILED ATTEMPT (assertion traceback & error stderr) from ✅ PASSED ATTEMPT (successful rerun output & execution log) side-by-side. - ⚙️ Customizable Navigation Settings: Direct sidebar settings modal allowing users to toggle, reorder, or customize visible dashboard navigation tabs with multi-tier storage persistence.
- 🎯 Transparent Quality Gate & Test Tiers: Automated classification across Smoke/Critical, High Priority (P1), API Integration, and Regression/E2E with an interactive calculation breakdown modal.
- ⚡ Zero-Latency Multi-Tier Storage (
VRStorage): 5-tier caching hierarchy (Memory,localStorage,sessionStorage, cookies, andCache API) for instant 0ms offline loads. - 📈 Historical Trends & Flaky Tracking: Automatically snapshots and preserves up to 30 previous test runs in lightweight
.history/files. - 🤖 AI-Ready Agent Interface (
llms.txt): Built-in/llms.txtendpoint for automated LLM context retrieval and agent pair-programming. - 🧩 Universal Compatibility: Works out of the box with pytest, Playwright, Robot Framework, Jest, Cypress, Vitest, TestNG, JUnit 5, and any tool generating JUnit XML.
Testing Frameworks Integration & Reporting
VelvetReport acts as a modern, self-contained reporting system. While test execution runs your test scripts (performing assertions, API requests, and browser interactions), test reporting structures these outcomes into an easily readable, interactive dashboard containing diagnostics, logs, trends, and attachments.
Python (pytest / Playwright) Integration
VelvetReport provides native, zero-config reporting for Python testing using pytest. The velvet-report pytest plugin automatically hooks into your tests to capture run telemetry and environment info.
1. Why Reporting is Required
- Analyze Failures: Instantly pinpoint why a Python browser or API test failed.
- Diagnostics: View duration, error stack traces, and system-under-test environments.
- Evidence Collection: Access screenshots and logs associated with failed tests.
- CI/CD Insights: Track execution trends over multiple builds using historical data.
2. Prerequisites & Installation
Ensure you have Python >= 3.8. Install the required packages via pip:
# Install pytest, playwright, and the VelvetReport collector
pip install pytest pytest-playwright velvet-report
# Install browser binaries for Playwright
playwright install
3. Reporting Configuration
VelvetReport is configured directly in your pytest.ini file at the root of your project:
[pytest]
# Direct pytest to output JUnit XML to the reports folder
addopts = --junitxml=reports/results.xml
# VelvetReport specific configurations
vReport_Title = Playwright Python Suite
vReport_output = reports
vReport_history = reports/.history
vReport_open = false
vReport_embed_max = 2M
vReport_email_report_enable = false
- vReport_Title: Custom title shown in the report topbar.
- vReport_output: The directory where the final
velvetreport.htmlis built (default:reports). - vReport_history: History trend logs directory (default:
reports/.history). - vReport_embed_max: Limits the maximum file size (e.g.
2Mfor 2 megabytes) of attachments embedded directly as base64 inside the offline HTML.
4. Supported Capabilities
- Execution Timings: Timings of setup, call, and teardown test phases, including fixture overheads.
- Worker/Platform Dist: Track test distribution across multiple workers (when using
pytest-xdist). - Assertion vs. Timeout Identification: Auto-categorizes errors into Assertion, Timeout, Network, or Script.
- Automatic Attachment Discovery (Playwright): On failed tests, VelvetReport automatically scans the Playwright
test-results/directory, extracts screenshots, and encodes them directly into the report. - Manual Attachments: Manually attach logs, videos, or screenshots in code:
import velvet_report.get_pytest_data as vr def test_homepage(page): page.goto("https://playwright.dev") # Add step metadata with vr.step("Capture screenshot"): vr.attach(page.screenshot(), name="home.png", mime="image/png")
5. Run Tests and Generate Report
To run your test suite and automatically generate the VelvetReport HTML dashboard:
# Run pytest (VelvetReport executes as a plugin and compiles the HTML dashboard)
pytest
The report is generated at: reports/velvetreport.html
6. Open the Report
Open the generated HTML dashboard file directly in any browser — no local server is required:
# On Windows
start reports/velvetreport.html
# On macOS
open reports/velvetreport.html
Click on any failed test in the suite tree to inspect step logs, stack traces, and embedded screenshots.
7. Customization Options
- Command Line Overrides:
pytest --vReport-title "Staging Regression Run" --vReport-output custom-reports --vReport-open
- Filter and Search: The UI supports full tag filters (e.g.
@smoke,@regression), text search, and test status toggles.
8. CI/CD Usage
In CI/CD (such as GitHub Actions), run tests, archive the generated HTML report, and review the dashboard in pipeline artifacts.
# .github/workflows/test.yml snippet
- name: Run Pytest Suite
run: pytest
- name: Archive Test Report
if: always()
uses: actions/upload-artifact@v4
with:
name: velvetreport
path: reports/velvetreport.html
Report Features
Metrics & KPIs
- 12 KPI cards — Total, Passed, Failed, Errors, Skipped, Rerun, Pass Rate, Avg Test Time, Total Duration, Stability Score (0–100), Flaky %, Failure Reproducibility — animated count-up on view.
- Risk badge — STABLE / UNSTABLE / HIGH RISK.
- Click any KPI card → modal listing the exact test cases behind it.
Test Details Drawer
- Expandable suite tree with per-test tabs: Summary (phases/fixtures/reason/thumbnail), Stack Trace, Run History, Logs, Tags & Steps, Screenshots, Attachments.
- Run history — per-run status, duration, date/time, failure reason, screenshot — mapped correctly by file + test name across 30 runs.
- FLAKY badge — auto-detected vs previous runs.
- Live search + filter (All / Passed / Failed / Skipped / Flaky).
Visual Analysis & Charts
- Test Execution Timeline — animated per-test bars.
- Mind Map — Root → Suite → Describe → Test, clickable nodes open full detail.
- Failure Analysis — auto-classified: Assertion / Timeout / Network / Script, with screenshot preview in modal.
- Pass/Fail donut, Duration histogram, Volume & Outcome Trends, Duration Trends, Test Distribution by Worker, Browser Distribution, Top 10 Slowest, Suite Health.
📧 Automated Executive Email Summary Report
In addition to the full interactive dashboard (velvetreport.html), VelvetReport generates an ultra-clean, email-client-friendly single-file HTML summary: velvetreport_email.html.
🌟 Key Highlights of the Email Report
- Executive Snapshot: Designed specifically for CI/CD notifications (GitHub Actions, GitLab CI, Jenkins, Slack/Teams email dispatch, Outlook, Gmail, Apple Mail).
- Zero External Scripts: 100% inline CSS and HTML table structure that renders reliably without being blocked by corporate email spam filters or mail user agents.
- Delta Trend Metrics (
162 | ↑ 5): Metric cards showcase pass/fail/total/flaky comparisons against the previous test execution (e.g.,162 | ↑ 5or12 | ↓ 2). - Timing & Execution Banner: Highlights Start Time, End Time, Duration, Git Branch, and Framework runtime metadata at the top.
- New vs. Repeated Failures: Distinguishes newly emerging test failures (
[NEW FAIL]) from recurrent failures ([REPEATED FAIL]) with visual alert badges.
How to Generate the Email Report
1. Via Command-Line Interface (CLI)
- Python / pytest:
pytest --vReport-email - Node.js / npx / global CLI:
velvet-report generate reports/results.xml ./reports --email # or using npx directly npx velvet-report generate reports/results.xml ./reports --email
2. Via pytest.ini Configuration (Python)
Add vReport_email = true (or its alias vReport_email_report_enable = true) to your pytest.ini:
[pytest]
addopts = --junitxml=reports/results.xml
# Generate email-ready HTML summary alongside velvetreport.html
vReport_email = true
vReport_email_report_enable = true
vReport_output = reports
3. Programmatically in Python
from velvet_report import generate_report
# Generates reports/velvetreport.html AND reports/velvetreport_email.html
generate_report(
junit_xml="reports/results.xml",
output_dir="reports",
email_en=True, # Enable email HTML generation
title="Nightly Regression Suite"
)
4. Programmatically in Node.js / JavaScript / TypeScript
const { generate, buildEmailHtml, parseJunit } = require('velvet-report');
// Option A: Generate both reports to disk
generate('reports/results.xml', './reports', {
title: 'CI Test Run',
email: true // writes reports/velvetreport_email.html
});
// Option B: Generate raw email HTML in-memory to send via Nodemailer / SendGrid
const fs = require('fs');
const xml = fs.readFileSync('reports/results.xml', 'utf8');
const report = parseJunit(xml, 'results.xml');
const emailHtml = buildEmailHtml(report);
5. CI/CD Notification Dispatch (GitHub Actions)
- name: Run Tests & Generate Reports
run: pytest --vReport-email
if: always()
- name: Send Email Report Notification
if: always()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: "Test Execution Summary: ${{ github.repository }} (#${{ github.run_number }})"
html_body: file://reports/velvetreport_email.html
to: team-qa@example.com
Configuration Reference
Python (pytest.ini & CLI Options)
| Key | CLI Flag | Default | Description |
|---|---|---|---|
vReport_Title |
--vReport-title <text> |
XML filename | Custom report title shown in dashboard header |
vReport_output |
--vReport-output <dir> |
reports |
Output folder for HTML reports |
vReport_history |
--vReport-history <dir> |
reports/.history |
Directory where historical runs are stored |
vReport_xml |
--vReport-xml <path> |
Auto-detected | Path to JUnit XML input file |
vReport_open |
--vReport-open |
false |
Automatically open dashboard in default browser |
vReport_disable |
--vReport-disable |
false |
Disable VelvetReport generation entirely |
vReport_capture |
— | auto |
pytest telemetry capture (auto | off) |
vReport_embed_max |
— | 2M |
Maximum attachment size to embed as base64 |
vReport_email / vReport_email_report_enable |
--vReport-email |
false |
Generate email-friendly summary (velvetreport_email.html) |
vReport_server |
--vReport-server <url> |
"" |
VelvetReport Platform server URL for auto-upload |
vReport_token |
--vReport-token <token> |
"" |
Bearer authorization token for Platform upload |
Node.js CLI & Programmatic API
velvet-report generate <junit.xml | dir/> [output-dir] [options]
velvet-report server [--port 4100]
velvet-report clear-history [dir]
velvet-report info
Node.js CLI Options
| Flag | Default | Description |
|---|---|---|
--title <text> |
XML filename | Report title |
--history <dir> |
<output>/.history |
History directory |
--open |
false |
Open the dashboard in default browser |
--email |
false |
Generate email summary (velvetreport_email.html) |
--server <url> |
"" |
Upload report XML to platform ingestion server |
--token <token> |
"" |
Bearer auth token for server upload |
--version, -v |
— | Print VelvetReport version |
--help, -h |
— | Show CLI help text |
Node.js Programmatic API Options
generate(xmlPath, outputDir, {
title: 'My Custom Suite', // Report title string
historyDir: 'reports/.history', // Historical data directory
open: false, // Open browser automatically
email: true // Generate velvetreport_email.html
});
Architecture & Local Platform Development
VelvetReport maintains a strict one-way build pipeline:
core/src/template-parts/ ← Modular HTML / CSS / browser runtime
core/src/parser.js ← JUnit XML parser
core/src/history.js ← History + email
core/packages/python/get_pytest_data/ ← pytest auto-capture plugin
↓
node scripts/build.js ← Compiles to all 3 platforms + 25 self-tests
↓
packages/pip → PyPI packages/npm → npm packages/maven → Maven Central
Local Platform Ingestion & Server (Optional)
For team workflows and local aggregation:
# 1. Start local ingestion server (defaults to port 4100)
node offlineReport/platform/server.js
# 2. Run platform verification tests
npm run test:platform
# 3. Build & verify offline packages
node scripts/build.js --verify
Contributing? See CONTRIBUTING.md — small files, FIX: headers, easy to extend.
Supported Frameworks
pytest · Playwright · Robot Framework · Jest · Cypress · Mocha · Jasmine · Vitest · Karma · WebdriverIO · JUnit 5 · TestNG · Maven Surefire · Gradle · RSpec · PHPUnit · gotestsum · xUnit · NUnit · and any tool that outputs standard JUnit XML.
💡 Suggest a Feature & Community Roadmap
We build VelvetReport directly around community feedback and user requests. If there's a test runner, CI tool, or feature you'd like to see:
- 💡 Submit a Suggestion Online: vreport.in/#suggestion
- 🐙 Open a Feature Request: GitHub Issues
- 🚀 Vote on Upcoming Features: Visit vreport.in to upvote roadmap priorities.
Support the Project & Donate
If VelvetReport helps you or your team build and debug faster, please consider supporting the project. Your contributions directly help us maintain the library and reach our target of 10M+ downloads/users!
- ☕ Buy Me a Coffee: A fast, simple way to show support.
- 💖 Sponsor on GitHub: Fund ongoing maintenance and feature development.
- ⭐ Star the Repository: Help increase the project's visibility across the developer community.
License
MIT © Tarun Dwivedi and VelvetReport Contributors.
Keywords: junit xml report generator, html test report, pytest html report, pytest allure alternative, playwright test report, jest html reporter, cypress report, offline html test report, self-contained test report, CI test dashboard, test history tracking, flaky test detection, xdist report, python test report, junit 5 report, maven surefire report
Metadata
Release files for velvet-report 2.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| velvet_report-2.1.5.tar.gz | 177.9 kB | Without provenance | Details for velvet_report-2.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| velvet_report-2.1.5-py3-none-any.whl | Python 3 | none | any | Details for velvet_report-2.1.5-py3-none-any.whl |
Total release size: 353.6 kB
Release files / velvet_report-2.1.5.tar.gz
| Download URL | velvet_report-2.1.5.tar.gz |
|---|---|
| Size | 177.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c37ecd48272df0aa2b24504eaa61affe8fbe3843861a08ce66d83c7458baa93e
|
|
BLAKE2b-256 checksum How to use checksums |
873f8b1b19dcc0410fc7bdfba5c65eeed90ae76666cd670d78213a7eeaa3f3a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / velvet_report-2.1.5-py3-none-any.whl
| Download URL | velvet_report-2.1.5-py3-none-any.whl |
|---|---|
| Size | 175.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9c9bc5d3ef947c57ba1c3c1aa59a289c8a7aa0823be20e8d011882d88e49d32
|
|
BLAKE2b-256 checksum How to use checksums |
a6522d3d5f9f918a6d76b00e9eaf99392fca5b013a43a18bba76704a2d98d344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Security for velvet-report 2.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.