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.
pip install pytest-html-mergerNo compatibility data collected yet for this library.
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.
Use the command-line interface provided. To automate, wrap the command in a shell script or use Python's `subprocess` module.
Ensure that your `pytest-html` reports are generated with the `--self-contained-html` flag (e.g., `pytest --html=report.html --self-contained-html`).
Monitor `pytest-html` release notes for breaking changes related to report structure. If issues arise after a `pytest-html` update, consider pinning `pytest-html` to an older compatible version or checking for updates to `pytest-html-merger`.
Run `pip install pytest-html-merger` to install the package. Ensure your virtual environment is activated if you are using one.
Provide the path to individual HTML report files (e.g., `pytest_html_merger report1.html report2.html -o merged.html`) or specify an input directory (e.g., `pytest_html_merger -i ./reports -o merged.html`).
Regenerate your individual pytest HTML reports using the `--self-contained-html` flag with `pytest-html` (e.g., `pytest --html=report.html --self-contained-html`).