blob: 1f44832e30754261adb8ab6e4b2f35a81b448a42 [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
Daryl Wallecke36f6232012-03-06 00:21:45 -060036Tempest is not tied to any single test runner, but Nose been the most commonly
37used tool. After setting up your configuration file, you can execute
38the set of Tempest tests by using ``nosetests`` ::
Brian Lamar930fc5b2011-12-08 11:51:26 -050039 $> nosetests tempest
Daryl Wallecke36f6232012-03-06 00:21:45 -060040
nayna-patelddb489c2012-11-13 22:06:45 +000041To run one single test ::
42 $> nosetests -sv tempest.tests.compute.servers.test_server_actions.py:
43 ServerActionsTestJSON.test_rebuild_nonexistent_server
44
Daryl Wallecke36f6232012-03-06 00:21:45 -060045Configuration
46-------------
47
48At present, there are three sections to be configured: nova, environment,
49and image. The nova section includes information about your Keystone endpoint,
50as well as valid credentials for a user. It also contains logical timeouts
51for certain actions. The environment section contains reference data to be
52used when testing the Compute portion of OpenStack, as well as feature flags
53for tests that may or may not work based on your hypervisor or current
54environment. Lastly, the image section contains credentials and endpoints for
55the Glance image service.
56
57Common Issues
58-------------
59
60Tempest was originally designed to primarily run against a full OpenStack
61deployment. Due to that focus, some issues may occur when running Tempest
62against devstack.
63
64Running Tempest, especially in parallel, against a devstack instance may
65cause requests to be rate limited, which will cause unexpected failures.
66Given the number of requests Tempest can make against a cluster, rate limiting
67should be disabled for all test accounts.
68
69Additionally, devstack only provides a single image which Nova can use.
70For the moment, the best solution is to provide the same image uuid for
71both image_ref and image_ref_alt. Tempest will skip tests as needed if it
72detects that both images are the same.