pytest-html
pytest plugin for generating HTML reports
Install
pytest-html on PyPI
pip
pip install pytest-htmluv
uv add pytest-htmlpoetry
poetry add pytest-htmlPackage facts
| License | MPL-2.0 (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — jinja2, pytest-metadata, pytest |
| Maintenance | actively maintained — 206 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pytest_html-4.2.0-py3-none-any.whl
Keywords: html, pytest, report
About pytest-html
from the package's own PyPI description — quoted content, verbatim
pytest-html
pytest-html is a plugin for pytest <http://pytest.org>_ that generates a HTML report for test results.
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg :target: https://github.com/pytest-dev/pytest-html/blob/master/LICENSE :alt: License .. image:: https://img.shields.io/pypi/v/pytest-html.svg :target: https://pypi.python.org/pypi/pytest-html/ :alt: PyPI .. image:: https://img.shields.io/conda/vn/conda-forge/pytest-html.svg :target: https://anaconda.org/conda-forge/pytest-html :alt: Conda Forge .. image:: https://github.com/pytest-dev/pytest-html/workflows/gh/badge.svg :target: https://github.com/pytest-dev/pytest-html/actions :alt: CI .. image:: https://img.shields.io/requires/github/pytest-dev/pytest-html.svg :target: https://requires.io/github/pytest-dev/pytest-html/requirements/?branch=master :alt: Requirements .. image:: https://codecov.io/gh/pytest-dev/pytest-html/branch/master/graph/badge.svg?token=Y0myNKkdbi :target: https://codecov.io/gh/pytest-dev/pytest-html :alt: Codecov
Resources
Documentation <https://pytest-html.readthedocs.io/en/latest/>_- `Release Notes...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
pytest-html is a pytest plugin that generates HTML reports summarizing test results, including pass/fail status, timing, and metadata for each test execution.
Low friction install with three stable runtime dependencies (pytest, jinja2, pytest-metadata). Actively maintained with recent commits and production-stable status; supports Python 3.9–3.14 and both CPython and PyPy.
Licensed under MPL-2.0 (copyleft), which requires derivative works to disclose source and license under the same terms; acceptable for internal testing but review required if bundling or modifying for distribution.
Usage
pip install pytest-html
pytest --html=report.html --self-contained-html
Requires pytest to be installed; pytest-html acts as a plugin and cannot run standalone.
Verdict: pytest-html is a mature, well-maintained testing utility in the top 1000 PyPI packages with no known vulnerabilities. Its copyleft license is standard for testing tools and poses no barrier to typical development use. Recommended for teams needing shareable HTML test reports.
Needs verification
- Whether the HTML report supports interactive features (filtering, sorting) beyond static display.
- Performance characteristics with very large test suites (thousands of tests).
- Customization options for report styling and layout beyond what jinja2 templating provides.
Similar packages
copyleft · top 1,000 on PyPI
pytest-djangopermissive · top 1,000 on PyPI
pytest-rerunfailurescopyleft · top 1,000 on PyPI
pluggypermissive · top 100 on PyPI
pytest-json-ctrfpermissive · top 1,000 on PyPI
tensorboardpermissive · top 1,000 on PyPI
pytestpermissive · top 100 on PyPI
pytest-mockpermissive · top 1,000 on PyPI
pytest-asynciopermissive · top 1,000 on PyPI
pytest-covpermissive · top 1,000 on PyPI