$npx skillfedfor your agent

pytest-replay

Saves previous test runs and allow re-execute previous pytest runs to reproduce crashes or flaky tests

Worth itPyPI TestingReleased Dec 202579.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_replay-1.7.1-py3-none-any.whl
v1.7.1 · released 2025-12-23 · Python >=3.9 · 1 runtime deps: pytest

Yes. This is a focused, low-friction tool that directly solves a real pain point in parallel testing. It has no security vulnerabilities, a permissive license, active maintenance, and a single lightweight dependency. Install it if you use pytest-xdist and encounter flaky or order-dependent test failures.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • pytest must be installed; pytest-xdist is required for parallel replay of multiple files.
  • Installs cleanly with only pytest as a dependency.
  • Actively maintained with recent releases; last commit on 2026-08-03 and latest release on 2025-12-23.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.

last release 2025-12-23 (234 days) · last repo commit 2026-08-03 · 63 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 79,657 downloads/mo, #14,344 on PyPI

Verify before relying

pip install pytest-replay

# Record test execution order during parallel run:
pytest -n auto --replay-record-dir=build/tests/replay

# Replay tests in the same order:
pytest --replay=.pytest-replay-gw0.txt
  • Whether the plugin works correctly with all pytest plugins and fixtures in real-world test suites.
  • Performance overhead of recording and replaying large test runs.
Same gist for agents: .md · .json

What it is and what it does

pytest-replay is a pytest plugin that solves the problem of reproducing test failures that occur only under specific execution orders in parallel test runs. When pytest-xdist runs tests across multiple workers, the order is non-deterministic, making it nearly impossible to recreate a flaky failure locally. This plugin records the exact sequence of test node IDs, start times, finish times, and outcomes for each worker into JSON files, then allows you to replay that exact sequence later.

The plugin records metadata including test start and finish times, which helps identify race conditions and timing-dependent failures. It supports replaying single or multiple worker files in parallel (with xdist installed), and provides a `replay_metadata` fixture to capture additional context needed for reproducibility, such as random seeds. The recorded files are JSON-based and remain readable even if a test crashes, addressing a limitation of pytest's built-in cache.

Use it for

  • Reproduce a flaky test failure seen in CI by downloading the replay file and running it locally with the same test order.
  • Debug race conditions in concurrent tests by analyzing timing data and test execution sequences across workers.
  • Replay an entire multi-worker CI run locally to verify a fix without waiting for the full CI pipeline.
  • Capture and store random seeds or other metadata needed to make non-deterministic tests reproducible.
  • Analyze which tests ran before a crash to narrow down the cause of a sudden failure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a focused, low-friction tool that directly solves a real pain point in parallel testing. It has no security vulnerabilities, a permissive license, active maintenance, and a single lightweight dependency. Install it if you use pytest-xdist and encounter flaky or order-dependent test failures.

Install

pytest-replay on PyPI

Before you install

Installs cleanly with only pytest as a dependency. Actively maintained with recent releases; last commit on 2026-08-03 and latest release on 2025-12-23.

pytest must be installed; pytest-xdist is required for parallel replay of multiple files.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.

Quickstart

pip install pytest-replay

# Record test execution order during parallel run:
pytest -n auto --replay-record-dir=build/tests/replay

# Replay tests in the same order:
pytest --replay=.pytest-replay-gw0.txt

Verify before relying

  • Whether the plugin works correctly with all pytest plugins and fixtures in real-world test suites.
  • Performance overhead of recording and replaying large test runs.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceActively maintained 234 days since the last release
Last repo commit
First released
Downloads79,657 / month, #14,344 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Testing

Evidence: pytest_replay-1.7.1-py3-none-any.whl

Tags

Capabilities
pytest flaky test reproductiontest execution replayxdist test order recordingreproduce parallel test failurespytest test replay pluginparallel test debuggingtest run recording
Topics
pytest-plugintest-debuggingparallel-testing

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 › “pytest flaky test reproduction”

  • pytest-replayA pytest plugin that records test execution order and timing from…
  • flakyA pytest plugin that automatically reruns failing tests up to a…
  • pytest-retrypytest-retry is a pytest plugin that automatically retries failed…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

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.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

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.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

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.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

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.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

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.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-flakefinder · pytest-rng · pytest-error-for-skips · pytest-forked · pytest-plus · pytest-ordering · pytest-rerunfailures · pytest-reportlog · pytest-vcr · pytest-parallel