diff --git a/README.rst b/README.rst index 2243536f1b..e9de77e6b7 100644 --- a/README.rst +++ b/README.rst @@ -109,15 +109,18 @@ as it is simpler, and quicker to work with. $ tempest run --workspace cloud-01 - There is also the option to use testr directly, or any `testr`_ based test - runner, like `ostestr`_. For example, from the workspace dir run:: + There is also the option to use `stestr`_ directly. For example, from + the workspace dir run:: - $ ostestr --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' + $ stestr run --black-regex '\[.*\bslow\b.*\]' '^tempest\.(api|scenario)' - will run the same set of tests as the default gate jobs. + will run the same set of tests as the default gate jobs. Or you can + use `unittest`_ compatible test runners such as `testr`_, `pytest`_ etc. +.. _unittest: https://docs.python.org/3/library/unittest.html .. _testr: https://testrepository.readthedocs.org/en/latest/MANUAL.html -.. _ostestr: https://docs.openstack.org/os-testr/latest/ +.. _stestr: https://stestr.readthedocs.org/en/latest/MANUAL.html +.. _pytest: https://docs.pytest.org/en/latest/ Library ------- diff --git a/tempest/tests/cmd/test_tempest_init.py b/tempest/tests/cmd/test_tempest_init.py index 5f39ac99a2..9042b12f35 100644 --- a/tempest/tests/cmd/test_tempest_init.py +++ b/tempest/tests/cmd/test_tempest_init.py @@ -22,7 +22,7 @@ from tempest.tests import base class TestTempestInit(base.TestCase): - def test_generate_testr_conf(self): + def test_generate_stestr_conf(self): # Create fake conf dir conf_dir = self.useFixture(fixtures.TempDir()) diff --git a/tox.ini b/tox.ini index de4f1b786d..59689286a8 100644 --- a/tox.ini +++ b/tox.ini @@ -78,6 +78,7 @@ setenv = {[tempestenv]setenv} deps = {[tempestenv]deps} # The regex below is used to select which tests to run and exclude the slow tag: # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 +# FIXME: We can replace it with the `--black-regex` option to exclude tests now. commands = find . -type f -name "*.pyc" -delete tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs} @@ -100,6 +101,7 @@ setenv = {[tempestenv]setenv} deps = {[tempestenv]deps} # The regex below is used to select which tests to run and exclude the slow tag: # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 +# FIXME: We can replace it with the `--black-regex` option to exclude tests now. commands = find . -type f -name "*.pyc" -delete tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs}