{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/6"}],"enrichment":{"capability":"A pytest plugin that records test execution order and timing from parallel test runs, then replays them in the same sequence to reproduce flaky or non-deterministic failures.","skillfed_tags":["pytest-plugin","test-debugging","parallel-testing"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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."},"id":"pytest-replay","links":{"html":"https://skillfed.io/packages/pytest-replay","md":"https://skillfed.io/packages/pytest-replay.md","pypi":"https://pypi.org/project/pytest-replay/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-12-23","license_spdx":null,"license_treatment":"permissive","name":"pytest-replay","python_support":"supports_current","summary":"Saves previous test runs and allow re-execute previous pytest runs to reproduce crashes or flaky tests"},"popularity":{"monthly_downloads":79657,"position":14344,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.7.1"}
