diff --git a/doc/source/contributor/testing.rst b/doc/source/contributor/testing.rst index d8a524b3..7f2fd237 100644 --- a/doc/source/contributor/testing.rst +++ b/doc/source/contributor/testing.rst @@ -16,15 +16,17 @@ refer to the `tox documentation`_ for assistance. Unit Tests ---------- -Currently, we provide tox environments for Python 2.7. By default -all available test environments within the tox configuration will execute +We follow the `Tested Runtimes ` +as defined by the Technical Committe every cycle. + +All available test environments within the tox configuration will execute when calling ``tox``. If you want to run them independently, you can do so with the following command: .. code-block:: bash - # Executes tests on Python 3.7 - tox -e py37 + # Executes tests on Python 3.9 + tox -e py39 .. note:: @@ -40,18 +42,18 @@ with the following command: # runs a single test with the function named # test_should_entity_str - tox -e py37 -- test_should_entity_str + tox -e py39 -- test_should_entity_str # runs only tests in the WhenTestingSecrets class and # the WhenTestingOrderManager class - tox -e p37 -- '(WhenTestingSecrets|WhenTestingOrderManager)' + tox -e p39 -- '(WhenTestingSecrets|WhenTestingOrderManager)' The function name or class specified must be one located in the `barbicanclient/tests` directory. Groups of tests can also be run with a regex match after the ``--``. - For more information on what can be done with ``testr``, please see: - http://testrepository.readthedocs.org/en/latest/MANUAL.html + For more information on what can be done with ``stestr``, please see: + https://stestr.readthedocs.io/en/latest/ You can also setup breakpoints in the unit tests. This can be done by adding ``import pdb; pdb.set_trace()`` to the line of the unit test you @@ -59,7 +61,6 @@ want to examine, then running the following command: .. code-block:: bash - # Executes tests on Python 2.7 tox -e debug .. note:: @@ -124,11 +125,6 @@ the functional tests through tox. # Execute Barbican Functional Tests tox -e functional - -By default, the functional tox job will use nosetests to execute the functional -tests. This is primarily due to nose being a very well known and common -workflow among developers. - .. note:: In order to run individual functional test functions, you must use the diff --git a/test-requirements.txt b/test-requirements.txt index d0c96f10..8f24b716 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,7 +9,6 @@ requests-mock>=1.2.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT oslotest>=3.2.0 # Apache-2.0 -nose>=1.3.7 # LGPL oslo.config>=5.2.0 # Apache-2.0 python-openstackclient>=3.12.0 # Apache-2.0 sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/tox.ini b/tox.ini index 01829014..6e7411ac 100644 --- a/tox.ini +++ b/tox.ini @@ -60,7 +60,7 @@ commands = # This tox env is purely to make local test development easier # Note: This requires local running instances of Barbican deps = {[testenv]deps} -commands = nosetests {toxinidir}/functionaltests/{posargs} -v +commands = stestr run --serial --slowest --test-path {toxinidir}/functionaltests {posargs} [flake8] ignore = H202,W504