stestr
A parallel Python test runner built around subunit
What it is and what it does
stestr is a dedicated test runner for Python projects that executes unittest test suites in parallel across multiple processes to reduce overall test time. It originated as a fork of testrepository but is now a standalone tool focused specifically on Python testing. The runner uses the subunit protocol to stream and aggregate results from multiple workers, and maintains a persistent repository of test run history to help with debugging failures and optimizing test scheduling.
You configure stestr with a .stestr.conf file (or a stestr section in tox.ini) that specifies where tests are located, then invoke stestr run to execute them. The tool handles test discovery, parallel distribution, result collection, and storage automatically. It stores results in a .stestr/ directory in your working directory, allowing you to inspect past runs and compare performance across test cycles.
Use it for:
- Speed up CI/CD pipelines by running large unittest suites in parallel across available CPU cores.
- Debug intermittent test failures by replaying specific test runs from the stored history.
- Migrate from testrepository to a modern, actively maintained test runner without rewriting test code.
- Track test performance trends over time by analyzing the persistent repository of run results.
- Run individual tests or modules without discovery overhead using the --no-discover flag.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
stestr is a parallel test runner for Python unittest suites that distributes test execution across multiple processes and maintains a history of test runs using the subunit protocol.
Yes. stestr is actively maintained, has low install friction, carries a permissive license, and solves a real problem—parallel test execution with result history—for Python projects using unittest. It supports modern Python versions and has no known vulnerabilities. Install it if your project runs unittest suites and would benefit from faster parallel execution or historical test analysis.
Install
stestr on PyPI
pip
pip install stestruv
uv add stestrpoetry
poetry add stestrInstalling stestr
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release and ongoing commits; supports current Python versions from 3.8 through 3.14.
License in practice
Apache-2.0 permissive license allows use in most projects, including proprietary software, with minimal restrictions.
Quickstart
pip install stestr
Create .stestr.conf:
[DEFAULT]
test_path=./tests
Then run: stestr run
Requires Python 3.8 or later; project must have unittest-compatible tests discoverable from a configured path.
Verify before relying
- Whether stestr's parallel scheduling strategies are documented or tunable for specific workload patterns.
- Performance characteristics when running very large test suites or with many worker processes.
- Integration depth with CI/CD systems beyond tox.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — cliff, python-subunit, fixtures, testtools, PyYAML, voluptuous, tomlkit |
| Maintenance | actively maintained — 175 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 202,542/month — #9,647 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: stestr-4.2.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
concurrencytestRuns unittest test suites concurrently across…
copyleft · top 15,000 on PyPI
os-testros-testr wraps the testr test runner to provide…
permissive · top 15,000 on PyPI
python-subunitSubunit is a streaming protocol library for…
permissive · top 5,000 on PyPI
xmlrunnerA unittest test runner that exports test…
copyleft · top 15,000 on PyPI
unittest-xml-reportingA unittest test runner that exports test…
permissive · top 5,000 on PyPI
rtestA Python test runner built in Rust that uses…
permissive · top 15,000 on PyPI
html-testRunnerA unittest test runner that generates…
permissive · top 15,000 on PyPI
robotframework-pabotPabot splits Robot Framework test execution…
permissive · top 5,000 on PyPI
nosenose extends unittest with automatic test…
copyleft · top 5,000 on PyPI
pytest-parallelA pytest plugin that runs tests in parallel…
permissive · top 15,000 on PyPI