blob: 992d19bf1190a0402ae46a43de679cfe0a223f2b [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
Sean Dagueb56052b2013-05-21 17:57:41 -04006This is a set of integration tests to be run against a live OpenStack
7cluster. Tempest has batteries of tests for OpenStack API validation,
8Scenarios, and other specific tests useful in validating an OpenStack
9deployment.
10
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050011
12Quickstart
13----------
14
Jay Pipes7f757632011-12-02 15:53:32 -050015To run Tempest, you first need to create a configuration file that
16will tell Tempest where to find the various OpenStack services and
Daryl Wallecke36f6232012-03-06 00:21:45 -060017other testing behavior switches.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050018
Jay Pipes7f757632011-12-02 15:53:32 -050019The easiest way to create a configuration file is to copy the sample
20one in the ``etc/`` directory ::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050021
Jay Pipes7f757632011-12-02 15:53:32 -050022 $> cd $TEMPEST_ROOT_DIR
Brian Lamar930fc5b2011-12-08 11:51:26 -050023 $> cp etc/tempest.conf.sample etc/tempest.conf
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050024
Brian Lamar930fc5b2011-12-08 11:51:26 -050025After that, open up the ``etc/tempest.conf`` file and edit the
Daryl Wallecke36f6232012-03-06 00:21:45 -060026configuration variables to match valid data in your environment.
27This includes your Keystone endpoint, a valid user and credentials,
28and reference data to be used in testing.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050029
Jay Pipes7f757632011-12-02 15:53:32 -050030.. note::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050031
Sean Dagueb56052b2013-05-21 17:57:41 -040032 If you have a running devstack environment, tempest will be
33 automatically configured and placed in ``/opt/stack/tempest``. It
34 will have a configuration file already set up to work with your
35 devstack installation.
Jay Pipes7f757632011-12-02 15:53:32 -050036
Daryl Wallecke36f6232012-03-06 00:21:45 -060037Tempest is not tied to any single test runner, but Nose been the most commonly
38used tool. After setting up your configuration file, you can execute
39the set of Tempest tests by using ``nosetests`` ::
Brian Lamar930fc5b2011-12-08 11:51:26 -050040 $> nosetests tempest
Daryl Wallecke36f6232012-03-06 00:21:45 -060041
nayna-patelddb489c2012-11-13 22:06:45 +000042To run one single test ::
43 $> nosetests -sv tempest.tests.compute.servers.test_server_actions.py:
44 ServerActionsTestJSON.test_rebuild_nonexistent_server
45
Daryl Wallecke36f6232012-03-06 00:21:45 -060046Configuration
47-------------
48
Sean Dagueb56052b2013-05-21 17:57:41 -040049Detailed configuration of tempest is beyond the scope of this
50document. The etc/tempest.conf.sample attempts to be a self
51documenting version of the configuration.
52
53The most important pieces that are needed are the user ids, openstack
54endpoints, and basic flavors and images needed to run tests.
Daryl Wallecke36f6232012-03-06 00:21:45 -060055
56Common Issues
57-------------
58
59Tempest was originally designed to primarily run against a full OpenStack
60deployment. Due to that focus, some issues may occur when running Tempest
61against devstack.
62
63Running Tempest, especially in parallel, against a devstack instance may
64cause requests to be rate limited, which will cause unexpected failures.
65Given the number of requests Tempest can make against a cluster, rate limiting
66should be disabled for all test accounts.
67
68Additionally, devstack only provides a single image which Nova can use.
69For the moment, the best solution is to provide the same image uuid for
70both image_ref and image_ref_alt. Tempest will skip tests as needed if it
71detects that both images are the same.