blob: 4161cc61ab86952f0039eb51d0c780b610f2e5e6 [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
Matthew Treinishb17460e2013-09-17 17:04:03 +000035Tempest is not tied to any single test runner, but testr is the most commonly
Daryl Wallecke36f6232012-03-06 00:21:45 -060036used tool. After setting up your configuration file, you can execute
Matthew Treinishb17460e2013-09-17 17:04:03 +000037the set of Tempest tests by using ``testr`` ::
Attila Fazekas58d23302013-07-24 10:25:02 +020038
Matthew Treinishb17460e2013-09-17 17:04:03 +000039 $> testr run --parallel 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
Matthew Treinishb17460e2013-09-17 17:04:03 +000043 $> testr run --parallel tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_rebuild_nonexistent_server
44
45Alternatively, you can use the run_tests.sh script which will create a venv
46and run the tests or use tox to do the same.
nayna-patelddb489c2012-11-13 22:06:45 +000047
Daryl Wallecke36f6232012-03-06 00:21:45 -060048Configuration
49-------------
50
Sean Dagueb56052b2013-05-21 17:57:41 -040051Detailed configuration of tempest is beyond the scope of this
52document. The etc/tempest.conf.sample attempts to be a self
53documenting version of the configuration.
54
55The most important pieces that are needed are the user ids, openstack
56endpoints, and basic flavors and images needed to run tests.
Daryl Wallecke36f6232012-03-06 00:21:45 -060057
58Common Issues
59-------------
60
61Tempest was originally designed to primarily run against a full OpenStack
62deployment. Due to that focus, some issues may occur when running Tempest
63against devstack.
64
65Running Tempest, especially in parallel, against a devstack instance may
66cause requests to be rate limited, which will cause unexpected failures.
67Given the number of requests Tempest can make against a cluster, rate limiting
68should be disabled for all test accounts.
69
70Additionally, devstack only provides a single image which Nova can use.
71For the moment, the best solution is to provide the same image uuid for
72both image_ref and image_ref_alt. Tempest will skip tests as needed if it
73detects that both images are the same.