skillfed

pytest-json

Generate JSON test reports

pytest-json v0.4.0 328.2K downloads/30d#7,557 on PyPI15
Permissive license MIT Abandoned released

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-json

uv

uv add pytest-json

poetry

poetry add pytest-json

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing

Tags

pytest json report generatortest results to jsonpytest json output pluginjson test reportingpytest json api exportautomated test report json
test-reportingjson-exportabandoned

More Testing packages