blob: 04a4b3e765571d4c3e7d357525bb279a3caa7114 [file] [log] [blame]
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05001::
2
Jay Pipes7f757632011-12-02 15:53:32 -05003Tempest - The OpenStack Integration Test Suite
4==============================================
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05005
Soren Hansen5d40bdb2011-08-26 16:06:37 +02006This is a set of integration tests to be run against a live cluster.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05007
8Quickstart
9----------
10
Jay Pipes7f757632011-12-02 15:53:32 -050011To run Tempest, you first need to create a configuration file that
12will tell Tempest where to find the various OpenStack services and
Daryl Wallecke36f6232012-03-06 00:21:45 -060013other testing behavior switches.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050014
Jay Pipes7f757632011-12-02 15:53:32 -050015The easiest way to create a configuration file is to copy the sample
16one in the ``etc/`` directory ::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050017
Jay Pipes7f757632011-12-02 15:53:32 -050018 $> cd $TEMPEST_ROOT_DIR
Brian Lamar930fc5b2011-12-08 11:51:26 -050019 $> cp etc/tempest.conf.sample etc/tempest.conf
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050020
Brian Lamar930fc5b2011-12-08 11:51:26 -050021After that, open up the ``etc/tempest.conf`` file and edit the
Daryl Wallecke36f6232012-03-06 00:21:45 -060022configuration variables to match valid data in your environment.
23This includes your Keystone endpoint, a valid user and credentials,
24and reference data to be used in testing.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050025
Jay Pipes7f757632011-12-02 15:53:32 -050026.. note::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050027
Jay Pipes7f757632011-12-02 15:53:32 -050028 If you have a running devstack environment, look at the
29 environment variables in your ``devstack/localrc`` file.
30 The ADMIN_PASSWORD variable should match the api_key value
Brian Lamar930fc5b2011-12-08 11:51:26 -050031 in the tempest.conf [nova] configuration section. In addition,
Jay Pipes7f757632011-12-02 15:53:32 -050032 you will need to get the UUID identifier of the image that
33 devstack uploaded and set the image_ref value in the [environment]
Brian Lamar930fc5b2011-12-08 11:51:26 -050034 section in the tempest.conf to that image UUID.
Jay Pipes7f757632011-12-02 15:53:32 -050035
Armando Migliacciodc7d0172012-04-23 16:51:27 +010036 In addition, the ``<devstack-repo>/tools/configure_tempest.sh`` script can
37 also be used to generate a tempest.conf based on your devstack's rc files.
nayna-patelddb489c2012-11-13 22:06:45 +000038 TEMPEST_DIR variable points to location /opt/stack/temptest. Update this
39 variable if the location is different..
Daryl Wallecke36f6232012-03-06 00:21:45 -060040
41Tempest is not tied to any single test runner, but Nose been the most commonly
42used tool. After setting up your configuration file, you can execute
43the set of Tempest tests by using ``nosetests`` ::
Brian Lamar930fc5b2011-12-08 11:51:26 -050044 $> nosetests tempest
Daryl Wallecke36f6232012-03-06 00:21:45 -060045
nayna-patelddb489c2012-11-13 22:06:45 +000046To run one single test ::
47 $> nosetests -sv tempest.tests.compute.servers.test_server_actions.py:
48 ServerActionsTestJSON.test_rebuild_nonexistent_server
49
Daryl Wallecke36f6232012-03-06 00:21:45 -060050Configuration
51-------------
52
53At present, there are three sections to be configured: nova, environment,
54and image. The nova section includes information about your Keystone endpoint,
55as well as valid credentials for a user. It also contains logical timeouts
56for certain actions. The environment section contains reference data to be
57used when testing the Compute portion of OpenStack, as well as feature flags
58for tests that may or may not work based on your hypervisor or current
59environment. Lastly, the image section contains credentials and endpoints for
60the Glance image service.
61
62Common Issues
63-------------
64
65Tempest was originally designed to primarily run against a full OpenStack
66deployment. Due to that focus, some issues may occur when running Tempest
67against devstack.
68
69Running Tempest, especially in parallel, against a devstack instance may
70cause requests to be rate limited, which will cause unexpected failures.
71Given the number of requests Tempest can make against a cluster, rate limiting
72should be disabled for all test accounts.
73
74Additionally, devstack only provides a single image which Nova can use.
75For the moment, the best solution is to provide the same image uuid for
76both image_ref and image_ref_alt. Tempest will skip tests as needed if it
77detects that both images are the same.