2017-07-04 11:06:56 +01:00
|
|
|
=========
|
|
|
|
Testing
|
|
|
|
=========
|
|
|
|
|
|
|
|
The preferred way to run the unit tests is using ``tox``. There are multiple
|
|
|
|
test targets that can be run to validate the code.
|
|
|
|
|
|
|
|
``tox -e pep8``
|
|
|
|
Style guidelines enforcement.
|
|
|
|
|
2020-04-25 10:41:03 +00:00
|
|
|
``tox -e py38``
|
|
|
|
Traditional unit testing (Python 3.8).
|
2017-07-04 11:06:56 +01:00
|
|
|
|
|
|
|
``tox -e functional``
|
2020-04-25 10:41:03 +00:00
|
|
|
Live functional testing against an existing OpenStack instance. (Python 3.8)
|
2017-07-04 11:06:56 +01:00
|
|
|
|
2018-10-01 17:33:56 +09:00
|
|
|
``tox -e cover``
|
|
|
|
Generate a coverage report on unit testing.
|
2017-07-04 11:06:56 +01:00
|
|
|
|
|
|
|
Functional testing assumes the existence of a `clouds.yaml` file as supported
|
2018-10-09 12:06:55 +09:00
|
|
|
by :os-client-config-doc:`os-client-config <>`.
|
2017-07-04 11:06:56 +01:00
|
|
|
It assumes the existence of a cloud named `devstack` that behaves like a normal
|
|
|
|
DevStack installation with a demo and an admin user/tenant - or clouds named
|
|
|
|
`functional_admin` and `functional_nonadmin`.
|
|
|
|
|
|
|
|
Refer to `Consistent Testing Interface`__ for more details.
|
|
|
|
|
2019-04-22 20:07:49 +09:00
|
|
|
__ https://opendev.org/openstack/governance/src/branch/master/reference/project-testing-interface.rst
|