Test suite structure¶
There are three types of tests for Zaqar:
- Unit tests
Unit tests check modules separately. For example, there are checks for each individual method that the storage layer provides.
- Functional tests
Functional tests verify that the service works as expected. In particular, in Zaqar they exercise the API endpoints and validate that the API responses conform to the specs. These include positive and negative tests.
- Tempest tests
Tempest tests are integration tests for OpenStack .
Tempest tests for Zaqar are available in the Tempest repository.
Refer to Running tests document for details on how to run Unit and Functional tests.
Refer to the Tempest repository for details on how to run Tempest tests.
The test suite lives in
zaqar/tests directory of Zaqar:
Contains various configuration files for Zaqar. They help to test how Zaqar works in different configurations.
Contains functional tests.
Contains unit tests.
The base class of all test classes is located in the
When you run tests via
tox -e py27 command in the root directory of Zaqar:
Tox program executes:
.toxdirectory for storing python environments.
Parses this file and finds parameters for py27 testing environment.
Sets this environment up and activates it.
Sets environment variables for this environment that are described in
In case of Zaqar it invokes Testr program in the environment.
Testr (Test Repository) program executes:
Parses this file and finds parameters for executing tests.
.testrepositorydirectory for storing statistics of executing tests.
In case of Zaqar it invokes
Subunitprogram which finds all tests and executes it.
You can find more information about Testr in OpenStack Testr manual.