Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11pytest-html-reporter is a pytest plugin that generates a static HTML report from a test run. Install it in the Python environment used for testing, run pytest with --html-report, and open the generated report. Its documentation advertises suite summaries, history and archive views, failure screenshots, and test rerun support; those are documented features, not independently verified behavior.
What pytest-html-reporter produces
The package describes itself as one that “Generates a static html report based on pytest framework.” Its README presents the output as an overview of a run, including trends, suite highlights and test-suite details, along with archives or history. It also advertises screenshots on failure and test rerun support. See the PyPI project page and the project repository.
As an Amazon Associate I earn from qualifying purchases.
Static HTML makes the report a file to open or share rather than a live test dashboard. The documentation does not establish that every advertised feature works in every environment or with every current pytest version.
How it fits into a pytest workflow
The documented sequence is to install the plugin in the environment where pytest runs, invoke pytest with a report option, and then open the resulting HTML output.
#1 Best Overall
- Install: run
pip3 install pytest-html-reporterin the project’s active environment. - Run tests and request a report: for example,
pytest tests/ --html-report=./reportorpytest tests/ --html-report=./report/report.html. The README also demonstrates setting a title with--title='PYTEST REPORT'. - Open the output: locate the HTML file at the path produced by the installed version and open it in a browser.
PyPI’s instructions describe the default filename as pytest_html_reporter.html and the path as report; they also say that without --html-report, the project home directory is treated as the base. Defaults can depend on package version, so check the behavior of the version in your environment rather than assuming a path.
Configure it through pytest.ini
If the same report options should be used on ordinary runs, the project README shows placing them under a [pytest] section in pytest.ini:
[pytest]
addopts = -vs -rf --html-report=./report --title='PYTEST REPORT'
The README also documents --archive-count to limit how many builds appear in Archives. Consult the README for the option’s exact usage with the version you install.
Attach a failure screenshot
The README demonstrates passing screenshot bytes to the reporter with its attach helper. Its example uses Selenium:
from pytest_html_reporter import attach
attach(data=self.driver.get_screenshot_as_png())
This illustrates the intended pattern: provide screenshot data to attach. The documented Selenium example does not establish compatibility with every browser automation framework or screenshot format.
Check compatibility and release recency
PyPI lists a Python requirement of >=3.5, but that metadata is not a guarantee that the package installs or behaves correctly with a particular current Python and pytest combination. Validate it in the project’s actual environment.
PyPI records version 0.2.9 as uploaded on February 13, 2022, and the repository identifies v0.2.9 as its latest release on that date. The pytest plugin list also has a catalog entry dated September 6, 2026. A catalog listing confirms that the plugin is listed; it does not show that the project is actively maintained or compatible with all current versions.
Recommended Free Tools
Do not confuse it with pytest-reporter-html
pytest-html-reporter and pytest-reporter-html are different package names. The pytest catalog describes the separate pytest-reporter-html package as offering interactive reporting, step tracking, log capture and filtering. Those capabilities should not be attributed to pytest-html-reporter.
Best Value
When it may fit
Consider this plugin if a static HTML artifact, documented history views, or the documented screenshot-attachment pattern matches your reporting needs. Before adopting it for a current project, check its installation and behavior with your Python and pytest versions, and confirm that the advertised report features meet your workflow. The cited sources do not provide a controlled comparison with other reporters.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




