Gabbi + Tempest
Gabbi-tempest is an experimental Tempest plugin that enables testing the APIs of running OpenStack services, integrated with tempest but without needing to write Python. Instead the YAML format provided by gabbi is used to write and evaluate HTTP requests and responses.
Tests are placed in YAML files in one or more directories. Those
directories are added to a
variable. When that variable is passed into a tempest test
runner that is aware of the gabbi plugin, the files on that path
will be used to create tempests tests.
The test harness sets a series of enviornment variables that can be used in the YAML to reach the available services. The available variables may be extended in two ways:
- Adding them to the environment that calls tempest if the values are known.
- Setting them in a subclass of the plugin if the values need to be calculated from what tempest knows.
For each service in the service catalog there are
PLACEMENT_BASE). A useful
are also available.
For the time being the
To experiment with this you need a working tempest installation and configuration. One way to do that is to use devstack with the following added to the local.conf:
enable_service tempest INSTALL_TEMPEST=True
Once tempest is confirmed to be working, gabbi-tempest must be installed. Either install it from PyPI:
pip install gabbi-tempest
Or make a clone of this repo, cd into it, and do the equivalent of:
pip install -e .
If you are using virtualenvs or need sudo, your form will be different.
Go to the tempest directory (often
/opt/stack/tempest) and run
tempest as follows. Adding the
regex will limit the test run
to just gabbi related tests:
GABBI_TEMPEST_PATH=/path/one:/path/two tempest run --regex gabbi
This will run the tests described by the YAML files in