os-testr

3.0.0 · active · verified Thu Apr 16

os-testr is a Python library that acts as a wrapper for the `testr` (now often `stestr`) test runner, specifically providing additional functionality and integrations tailored for OpenStack projects. It enables features like `subunit-trace` for output filtering, `subunit2html` for HTML test reports, and `generate-subunit` for single test streams. The current version is 3.0.0, and its major release cadence is infrequent, typically aligning with broader OpenStack development cycles.

Common errors

Warnings

Install

Imports

Quickstart

os-testr is commonly invoked from the command line, often within `tox.ini` or project-specific `run_tests.sh` scripts in OpenStack environments. The primary executable is `ostestr`.

# To run all tests in an OpenStack project directory:
ostestr

# To run specific tests matching a regex pattern:
ostestr --regex '(my_project.tests.unit.test_module.TestClass.test_method)'

# To run tests in serial mode (default is parallel):
ostestr --serial

# To run tests with a specific number of parallel workers:
ostestr --concurrency 4

# To skip tests listed in a blacklist file:
ostestr -b /path/to/skip_tests.txt

view raw JSON →