stestr is a parallel Python test runner built around the `subunit` stream protocol. It provides a robust command-line interface for discovering, running, and managing tests, designed to efficiently handle large test suites and integrate well into continuous integration pipelines. The current version is 4.2.1, with minor and patch releases occurring every few months to enhance compatibility and add features.
pip install stestrNo compatibility data collected yet for this library.
This quickstart creates a temporary directory, sets up a basic `unittest` test suite and a `setup.cfg` for stestr configuration, then runs `stestr init` to initialize the test repository and `stestr run` to execute the tests. It demonstrates the typical command-line workflow for stestr.
Transition to using the default 'file' repository type. If SQL storage is required, use `subunit2sql` manually to process the subunit stream output.
Upgrade to stestr 4.0.1 or later (`pip install --upgrade stestr`) to resolve issues with unittest discovery and execution.
Upgrade to stestr 3.2.1 or later (`pip install --upgrade stestr`) to ensure accurate detection and reporting of test worker failures.
Ensure you are using stestr 4.1.0 or newer if you encounter problems related to `subunit` output or parsing, or if using `subunit` 1.4.3 or later.
Standardize your project's configuration to use one method (e.g., `pyproject.toml`) and ensure older `.stestr.conf` files are removed if no longer needed, to avoid unexpected behavior.
Remove the `--repository-type=sql` flag from your stestr commands or configuration. stestr now only supports the 'file' repository type by default. If you need SQL storage, use `subunit2sql` separately.
Ensure you have a `setup.cfg` (or `pyproject.toml` or `tox.ini`) with a `[stestr]` section correctly defining `test_path` and `test_file_prefix` to point to your test files. For example: ```ini [stestr] test_path = tests test_file_prefix = test_ ``` Also, ensure the test files exist and follow the naming convention.
Upgrade to stestr 4.0.1 or later (`pip install --upgrade stestr`) to fix issues with unittest discovery and execution.
Upgrade to stestr 3.2.1 or later (`pip install --upgrade stestr`) to ensure proper detection and reporting of test worker failures.