Universal HTML Test Report Generator
Project description
unireport
unireport is a Python library for generating beautiful, standalone HTML test reports from various testing frameworks.
Features
- Universal Support: Works with any testing framework that outputs standard formats (JUnit XML, Robot Framework XML).
- Beautiful Reports: Generates modern, interactive HTML reports with charts and filtering.
- Single File: The output is a single HTML file with embedded CSS and JS, easy to share.
- Visualizations: Includes charts to visualize test results (Pass/Fail/Skip).
Installation
pip install unireport
Usage
Programmatic Usage
from unireport import Report, TestSuite, TestCase, TestStatus, HTMLGenerator
# Create a report object
suite = TestSuite(name="My Suite", tests=[
TestCase(name="test_one", status=TestStatus.PASS, duration=0.1),
TestCase(name="test_two", status=TestStatus.FAIL, duration=0.2, message="Failed assertion")
])
report = Report(title="My Test Report", suites=[suite])
# Generate HTML
generator = HTMLGenerator()
generator.generate(report, "report.html")
Using Adapters
JUnit XML
from unireport import parse_junit_xml, HTMLGenerator
report = parse_junit_xml("results.xml")
HTMLGenerator().generate(report, "report.html")
Robot Framework
from unireport import parse_robot_xml, HTMLGenerator
report = parse_robot_xml("output.xml")
HTMLGenerator().generate(report, "report.html")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unireport_gen-0.1.0.tar.gz
(9.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unireport_gen-0.1.0.tar.gz.
File metadata
- Download URL: unireport_gen-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77af07e7039431f08c9481b20457ba04b10ea92e47929a9e4506586ed1753837
|
|
| MD5 |
d73b9f826224bf1f89d7768209d74c78
|
|
| BLAKE2b-256 |
6e60be8fbfb4d9c9b26332fc6d82d43e612ed56da56d5f50bf486e13a3388ef8
|
File details
Details for the file unireport_gen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: unireport_gen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb3e60b8a39ca8945e364b8585c907a172df874705bf232790ae485c175245e5
|
|
| MD5 |
1584472c756e6379bdb123f32558b4fd
|
|
| BLAKE2b-256 |
774cf4ae8f8c58dd3a632c211ebe9ead7ee25ce26bcb33b3bb1a218fd64c44a1
|