pytest-json
Generate JSON test reports
What it is and what it does
pytest-json is a pytest plugin that captures test execution results and writes them to a JSON file. It supports two output formats: a custom JSON structure and an optional JSON API-compliant format. The plugin allows you to specify the report path via command-line flag or pytest configuration file, and supports adding custom metadata at the environment, test, and stage levels through pytest hooks.
The package has no runtime dependencies and integrates directly into pytest's reporting pipeline. It was designed to work alongside pytest-html without conflicts. However, the project has been abandoned since 2016-01-18 and has not been updated to support modern Python or pytest versions, making it a significant compatibility risk for current development environments.
Use it for:
- Export pytest results to JSON for consumption by CI/CD pipeline tools or dashboards
- Generate JSON API-compliant test reports for integration with downstream frameworks
- Capture test metadata and environment information in structured JSON format for post-processing
- Archive test results in a machine-readable format for historical analysis or compliance reporting
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that generates JSON reports of test results, with optional JSON API normalization for consumption by downstream tools.
No. The package is abandoned (last release 2016-01-18, last commit 2017-11-14) and has not been maintained for years. It targets Python 2.7, 3.3, 3.4, 3.5 and pytest 2.7, all long obsolete. Install friction is high and there is no active maintenance or security oversight.
Install
pytest-json on PyPI
pip
pip install pytest-jsonuv
uv add pytest-jsonpoetry
poetry add pytest-jsonInstalling pytest-json
Before you install
High install friction and abandoned maintenance status. Last release was 2016-01-18 and last commit 2017-11-14. The package has not received updates in years.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects.
Quickstart
pip install pytest-json
py.test --json=report.json
or configure in pytest.ini:
[pytest]
json_report = report.json
Requires pytest 2.7 or newer; targets Python 2.7, 3.3, 3.4, 3.5 which are obsolete
Verify before relying
- Compatibility with pytest versions beyond 2.7 and Python versions beyond 3.5
- Whether the JSON schema or jsonapi output format remains compatible with current tools
- Status of any known issues or breaking changes since the last release
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,861 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 328,193/month — #7,557 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest-json-0.4.0.tar.gz
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-xmlA pytest plugin that generates XML output from…
unclear · top 15,000 on PyPI
pytest-loggingA pytest plugin that configures Python logging…
permissive · top 15,000 on PyPI
pytest-json-reportA pytest plugin that generates JSON-formatted…
permissive · top 5,000 on PyPI
pytest-htmlGenerates HTML reports for pytest test results,…
copyleft · top 1,000 on PyPI
pytest-item-dictA pytest plugin that builds hierarchical…
unclear · top 15,000 on PyPI
pytest-richA pytest plugin that uses rich to format and…
permissive · top 15,000 on PyPI
pytest-excelA pytest plugin that generates Excel reports…
permissive · top 15,000 on PyPI
pytest-cythonA pytest plugin that runs doctests embedded in…
unclear · top 15,000 on PyPI
pytest-jira-xrayA pytest plugin that marks individual tests…
permissive · top 15,000 on PyPI