CheckOps home

Tools directory

P

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.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

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

  1. Duration-based splits: Balanced groups from recorded timings.
  2. Simple CLI: --splits and --group flags.
  3. Algorithms: Choice of splitting algorithms.
  4. Unknown tests: Average duration for new tests.
  5. xdist compatible: Combine with in-machine parallelism.
  6. No service: Works offline from a committed file.

Pros

  1. No external service: Everything stays in the repo.
  2. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  3. Actively maintained: The repository had commits as recent as 3 February 2026.

Cons

  1. Stale timings: Durations file needs periodic refresh.
  2. Static split: No dynamic queue like hosted services.
  3. Small maintainer team: Releases are occasional.
pytest --store-durations
pytest --splits 4 --group 2

Resources:

Pricing

pytest-split is free and open source under the MIT licence.

  1. Python projects sharding tests across CI jobs.
  2. 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.