Merge "Docs: Update tempest test directory"
This commit is contained in:
commit
2076d0a9b5
21
TESTING.rst
21
TESTING.rst
@ -59,8 +59,8 @@ that broad categorization, here are a few more characteristic:
|
|||||||
such as an agent using no mocks.
|
such as an agent using no mocks.
|
||||||
* Integration tests - Run against a running cloud, often target the API level,
|
* Integration tests - Run against a running cloud, often target the API level,
|
||||||
but also 'scenarios' or 'user stories'. You may find such tests under
|
but also 'scenarios' or 'user stories'. You may find such tests under
|
||||||
tests/tempest/api, tests/tempest/scenario, tests/fullstack, and in the
|
tests/fullstack, and in the Tempest, Rally and
|
||||||
Tempest and Rally projects.
|
neutron-tempest-plugin(neutron_tempest_plugin/api|scenario) projects.
|
||||||
|
|
||||||
Tests in the Neutron tree are typically organized by the testing infrastructure
|
Tests in the Neutron tree are typically organized by the testing infrastructure
|
||||||
used, and not by the scope of the test. For example, many tests under the
|
used, and not by the scope of the test. For example, many tests under the
|
||||||
@ -329,7 +329,8 @@ See the gate_hook.sh comments for details.
|
|||||||
API Tests
|
API Tests
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
API tests (neutron/tests/tempest/api/) are intended to ensure the function
|
API tests (neutron-tempest-plugin/neutron_tempest_plugin/api/) are
|
||||||
|
intended to ensure the function
|
||||||
and stability of the Neutron API. As much as possible, changes to
|
and stability of the Neutron API. As much as possible, changes to
|
||||||
this path should not be made at the same time as changes to the code
|
this path should not be made at the same time as changes to the code
|
||||||
to limit the potential for introducing backwards-incompatible changes,
|
to limit the potential for introducing backwards-incompatible changes,
|
||||||
@ -343,10 +344,10 @@ be made about implementation. Only the contract defined by Neutron's REST API
|
|||||||
should be validated, and all interaction with the daemon should be via
|
should be validated, and all interaction with the daemon should be via
|
||||||
a REST client.
|
a REST client.
|
||||||
|
|
||||||
The neutron/tests/tempest/api directory was copied from the Tempest project around
|
The neutron-tempest-plugin/neutron_tempest_plugin directory was copied from the
|
||||||
the Kilo timeframe. At the time, there was an overlap of tests between the Tempest
|
Tempest project around the Kilo timeframe. At the time, there was an overlap of tests
|
||||||
and Neutron repositories. This overlap was then eliminated by carving out a subset
|
between the Tempest and Neutron repositories. This overlap was then eliminated by carving
|
||||||
of resources that belong to Tempest, with the rest in Neutron.
|
out a subset of resources that belong to Tempest, with the rest in Neutron.
|
||||||
|
|
||||||
API tests that belong to Tempest deal with a subset of Neutron's resources:
|
API tests that belong to Tempest deal with a subset of Neutron's resources:
|
||||||
|
|
||||||
@ -371,7 +372,7 @@ Scenario tests should be similarly split up between Tempest and Neutron
|
|||||||
according to the API they're targeting.
|
according to the API they're targeting.
|
||||||
|
|
||||||
To create an API test, the testing class must at least inherit from
|
To create an API test, the testing class must at least inherit from
|
||||||
neutron.tests.tempest.api.base.BaseNetworkTest base class. As some of tests
|
neutron_tempest_plugin.api.base.BaseNetworkTest base class. As some of tests
|
||||||
may require certain extensions to be enabled, the base class provides
|
may require certain extensions to be enabled, the base class provides
|
||||||
``required_extensions`` class attribute which can be used by subclasses to
|
``required_extensions`` class attribute which can be used by subclasses to
|
||||||
define a list of required extensions for particular test class.
|
define a list of required extensions for particular test class.
|
||||||
@ -379,8 +380,8 @@ define a list of required extensions for particular test class.
|
|||||||
Scenario Tests
|
Scenario Tests
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Scenario tests (neutron/tests/tempest/scenario), like API tests, use the
|
Scenario tests (neutron-tempest-plugin/neutron_tempest_plugin/scenario), like API tests,
|
||||||
Tempest test infrastructure and have the same requirements. Guidelines for
|
use the Tempest test infrastructure and have the same requirements. Guidelines for
|
||||||
writing a good scenario test may be found at the Tempest developer guide:
|
writing a good scenario test may be found at the Tempest developer guide:
|
||||||
https://docs.openstack.org/tempest/latest/field_guide/scenario.html
|
https://docs.openstack.org/tempest/latest/field_guide/scenario.html
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user