blob: f18628a6a5fdd6c5ec97abbd05e46f57d9206dc0 [file] [log] [blame]
Jay Pipes7f757632011-12-02 15:53:32 -05001Tempest - The OpenStack Integration Test Suite
2==============================================
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05003
Sean Dagueb56052b2013-05-21 17:57:41 -04004This is a set of integration tests to be run against a live OpenStack
5cluster. Tempest has batteries of tests for OpenStack API validation,
6Scenarios, and other specific tests useful in validating an OpenStack
7deployment.
8
Justin Shepherd0d9bbd12011-08-11 12:57:44 -05009
10Quickstart
11----------
12
Jay Pipes7f757632011-12-02 15:53:32 -050013To run Tempest, you first need to create a configuration file that
14will tell Tempest where to find the various OpenStack services and
Daryl Wallecke36f6232012-03-06 00:21:45 -060015other testing behavior switches.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050016
Jay Pipes7f757632011-12-02 15:53:32 -050017The easiest way to create a configuration file is to copy the sample
18one in the ``etc/`` directory ::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050019
Jay Pipes7f757632011-12-02 15:53:32 -050020 $> cd $TEMPEST_ROOT_DIR
Brian Lamar930fc5b2011-12-08 11:51:26 -050021 $> cp etc/tempest.conf.sample etc/tempest.conf
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050022
Brian Lamar930fc5b2011-12-08 11:51:26 -050023After that, open up the ``etc/tempest.conf`` file and edit the
Daryl Wallecke36f6232012-03-06 00:21:45 -060024configuration variables to match valid data in your environment.
25This includes your Keystone endpoint, a valid user and credentials,
26and reference data to be used in testing.
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050027
Jay Pipes7f757632011-12-02 15:53:32 -050028.. note::
Justin Shepherd0d9bbd12011-08-11 12:57:44 -050029
Sean Dagueb56052b2013-05-21 17:57:41 -040030 If you have a running devstack environment, tempest will be
31 automatically configured and placed in ``/opt/stack/tempest``. It
32 will have a configuration file already set up to work with your
33 devstack installation.
Jay Pipes7f757632011-12-02 15:53:32 -050034
Daryl Wallecke36f6232012-03-06 00:21:45 -060035Tempest is not tied to any single test runner, but Nose been the most commonly
36used tool. After setting up your configuration file, you can execute
37the set of Tempest tests by using ``nosetests`` ::
Attila Fazekas58d23302013-07-24 10:25:02 +020038
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 ::
Attila Fazekas58d23302013-07-24 10:25:02 +020042
Burt Holzman5da28f12013-07-13 21:50:23 -050043 $> nosetests -sv tempest.api.compute.servers.test_server_actions.py:
nayna-patelddb489c2012-11-13 22:06:45 +000044 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.