zun/doc/source/dev/tempest_tests.rst
Hongbin Lu d17fe49109 Document how to run tempest tests locally
* Add a dev document for how to run tempest tests locally.
* Pull the instruction of running unit tests out of quickstart
  guide and make it a standalone document.
* Fix the unit tests guide to make it work at Ubuntu 16.04.
* Add a sample local.conf as minimal to run devstack
* Add osprofiler guide to the index page.

Change-Id: I31794733c9225478f5df029279c8415a23b1caa0
2017-04-04 04:05:41 +00:00

2.0 KiB

Run tempest tests locally

This is a guide for developers who want to run tempest tests in their local machine.

Zun contains a suite of tempest tests in the zun/tests/tempest directory. Tempest tests are primary for testing integration between Zun and its depending software stack (i.e. Docker, other OpenStack services). Any proposed code change will be automatically rejected by the gate if the change causes tempest test failures. If this happens, contributors are suggested to refer this document to re-run the tests locally and perform any necessary trouble-shooting.

Prerequisite

You need to deploy Zun in a devstack environment.

Clone devstack:

# Create a root directory for devstack if needed
sudo mkdir -p /opt/stack
sudo chown $USER /opt/stack

git clone https://git.openstack.org/openstack-dev/devstack /opt/stack/devstack

We will run devstack with minimal local.conf settings required. You can use the sample local.conf as a quick-start:

git clone https://git.openstack.org/openstack/zun /opt/stack/zun
cp /opt/stack/zun/devstack/local.conf.sample /opt/stack/devstack/local.conf

Run devstack:

cd /opt/stack/devstack
./stack.sh

NOTE: This will take a while to setup the dev environment.

Run the test

Navigate to tempest directory:

cd /opt/stack/tempest

Run this command:

tox -eall-plugin -- zun.tests.tempest.api --concurrency=1