pytest-reportlog
Replacement for the --resultlog option, focused in simplicity and extensibility
Decision gist · record as of 2026-08-14
Yes. This is a stable, actively maintained plugin with low install friction, no security issues, and a clear use case: anyone migrating from --resultlog or needing structured, real-time test event logging should use it. The MIT license and minimal dependencies make it safe for any project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with only pytest as a runtime dependency.
- Actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects.
last release 2025-11-11 (276 days) · last repo commit 2026-08-03 · 104 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 801,875 downloads/mo, #5,021 on PyPI
Alternatives
Verify before relying
pip install pytest-reportlog
pytest your_tests.py --report-log=results.jsonl
# Read the JSON Lines output
import json
with open('results.jsonl') as f:
for line in f:
event = json.loads(line)
print(event['$report_type'], event.get('outcome'))- Whether compression formats (.gz, .bz2, .xz) require additional system libraries beyond Python stdlib.
- Real-time event processing guarantees and performance characteristics with large test suites.
What it is and what it does
pytest-reportlog is a pytest plugin that captures test execution events and writes them as JSON Lines to a file, one self-contained JSON object per line. It was created as a modern replacement for pytest's deprecated --resultlog option, focusing on simplicity and extensibility. Each line contains a report object with a $report_type identifier (e.g., SessionStart, TestReport, SessionFinish) plus event-specific fields like outcome, duration, and failure details. The file is flushed after each write, enabling real-time consumption by external systems.
The plugin supports automatic compression via common suffixes (.gz, .bz2, .xz) and includes a record_property fixture for attaching custom metadata to individual tests. It runs as a pytest plugin with no special configuration beyond installing the package and passing --report-log=FILE to pytest. The output format is designed for forward compatibility: consumers should ignore unrecognized report types and unknown keys, as future pytest versions may extend the objects.
Use it for
- Export test results to a structured format for CI/CD pipelines to parse and aggregate across multiple test runs.
- Stream test events in real-time to a monitoring system or dashboard during long test sessions.
- Attach custom properties (price, environment, build ID) to individual tests for post-analysis and reporting.
- Archive test execution history in compressed JSON Lines format for audit trails or compliance.
- Integrate pytest results with external tools that consume JSON events without needing custom pytest plugins.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a stable, actively maintained plugin with low install friction, no security issues, and a clear use case: anyone migrating from --resultlog or needing structured, real-time test event logging should use it. The MIT license and minimal dependencies make it safe for any project.
Install
pytest-reportlog on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with a recent release and no known vulnerabilities.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects.
Quickstart
pip install pytest-reportlog
pytest your_tests.py --report-log=results.jsonl
# Read the JSON Lines output
import json
with open('results.jsonl') as f:
for line in f:
event = json.loads(line)
print(event['$report_type'], event.get('outcome'))
Verify before relying
- Whether compression formats (.gz, .bz2, .xz) require additional system libraries beyond Python stdlib.
- Real-time event processing guarantees and performance characteristics with large test suites.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 276 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 801,875 / month, #5,021 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Testing |
Evidence: pytest_reportlog-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “test results logging”
- pytest-reportlogWrites pytest test results to a JSON Lines file in real-time,…
- behave-reportportalIntegrates Behave BDD test execution with ReportPortal, automatically…
- pytest-reportportalA pytest plugin that integrates test execution with ReportPortal,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-csv · pytest-json-report · pytest-tinybird · pytest-reporter · pytest-replay · pytest-md-report · pytest-rerunfailures · pytest-pretty · jsonformatter