CheckOps
pytest-split
pytest-split is an MIT pytest plugin that splits a test suite into equally timed groups based on recorded durations, for sharding across CI jobs.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
pytest-split splits a pytest suite into sub-suites of roughly equal duration based on test execution time. You record durations once with --store-durations, commit the .test_durations file, and then each CI job runs pytest --splits N --group i.
Tests without stored durations are distributed using an average, and algorithms such as duration-based chunks or least-duration balancing are available. It combines well with pytest-xdist: split across machines, then parallelise within each machine.
In the quality loop it reduces wall-clock CI time for large Python suites.
The source code is at jerry-git/pytest-split on GitHub under the MIT licence, with about 330 stars; the most recent commit was on 3 February 2026.
Features
- Duration-based splits: Balanced groups from recorded timings.
- Simple CLI:
--splitsand--groupflags. - Algorithms: Choice of splitting algorithms.
- Unknown tests: Average duration for new tests.
- xdist compatible: Combine with in-machine parallelism.
- No service: Works offline from a committed file.
Pros
- No external service: Everything stays in the repo.
- Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 3 February 2026.
Cons
- Stale timings: Durations file needs periodic refresh.
- Static split: No dynamic queue like hosted services.
- Small maintainer team: Releases are occasional.
Usage and Links (Example)
pytest --store-durations
pytest --splits 4 --group 2
Resources:
Pricing
pytest-split is free and open source under the MIT licence.
Recommended for?
- Python projects sharding tests across CI jobs.
- Teams that want splitting without a paid service.
Conclusion
pytest-split is a simple, effective way to shard pytest across CI machines.
Refresh the durations file regularly to keep groups balanced.
On CheckOps, pytest-split is filed under the Release & CI gates stage. Related tools listed here include pytest-xdist, pytest, Knapsack Pro, pytest-rerunfailures, Buildkite Test Engine and Currents. Which one fits best depends mostly on your stack, your team’s size and skills, and whether you prefer to run tools yourself or pay for a managed service. This page reflects the official website, documentation and repository as they stood on 11 November 2026.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with pytest-split side by side.
Ppytest-xdistpytest-xdist is an MIT pytest plugin that distributes tests across multiple CPUs or machines, speeding up large Python suites with load balancing.Compare with pytest-split- Ppytestpytest is the usual Python test runner: plain asserts, fixtures, parametrization, and a large plugin set.Compare with pytest-split
KKnapsack ProKnapsack Pro is a SaaS test-splitting service that balances test files across parallel CI nodes using a dynamic queue based on recorded execution times, for RSpec, Cypress, Jest and more.Compare with pytest-split
Ppytest-rerunfailurespytest-rerunfailures is an MPL-2.0 pytest plugin from pytest-dev that re-runs failed tests up to a set number of times to reduce flaky failures.Compare with pytest-split
BBuildkite Test EngineBuildkite Test Engine is a commercial test analytics service that detects and manages flaky tests, splits tests intelligently across CI agents, and shows test performance, using collectors or JUnit XML.Compare with pytest-split
CCurrentsCurrents is a paid CI dashboard for Playwright and a few other runners: traces, flake detection, and test orchestration.Compare with pytest-split