Pytest HTML Report Merger

0.1.0 · active · verified Thu Apr 16

pytest-html-merger is a utility designed to combine multiple HTML reports generated by the pytest-html plugin into a single, unified HTML report. It is currently at version 0.1.0 and is maintained with an active development cadence, with its latest release in July 2024.

Common errors

Warnings

Install

Quickstart

First, generate individual HTML reports using the `pytest-html` plugin. Then, use the `pytest_html_merger` command-line tool, specifying input files or directories and an output file.

# 1. Generate individual HTML reports with pytest-html
# Assuming you have tests in 'my_tests' directory
pytest my_tests/test_a.py --html=report_a.html
pytest my_tests/test_b.py --html=report_b.html

# 2. Merge the reports using pytest-html-merger
pytest_html_merger report_a.html report_b.html -o merged_report.html --title "My Combined Test Results"

# Or merge all HTML files in a directory
# Assuming reports are in a 'reports' directory
# mkdir reports && mv report_a.html report_b.html reports/
# pytest_html_merger -i reports -o merged_reports_from_dir.html

view raw JSON →