Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 1 | :: |
| 2 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 3 | Tempest - The OpenStack Integration Test Suite |
| 4 | ============================================== |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 5 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame^] | 6 | This is a set of integration tests to be run against a live OpenStack |
| 7 | cluster. Tempest has batteries of tests for OpenStack API validation, |
| 8 | Scenarios, and other specific tests useful in validating an OpenStack |
| 9 | deployment. |
| 10 | |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 11 | |
| 12 | Quickstart |
| 13 | ---------- |
| 14 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 15 | To run Tempest, you first need to create a configuration file that |
| 16 | will tell Tempest where to find the various OpenStack services and |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 17 | other testing behavior switches. |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 18 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 19 | The easiest way to create a configuration file is to copy the sample |
| 20 | one in the ``etc/`` directory :: |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 21 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 22 | $> cd $TEMPEST_ROOT_DIR |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 23 | $> cp etc/tempest.conf.sample etc/tempest.conf |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 24 | |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 25 | After that, open up the ``etc/tempest.conf`` file and edit the |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 26 | configuration variables to match valid data in your environment. |
| 27 | This includes your Keystone endpoint, a valid user and credentials, |
| 28 | and reference data to be used in testing. |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 29 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 30 | .. note:: |
Justin Shepherd | 0d9bbd1 | 2011-08-11 12:57:44 -0500 | [diff] [blame] | 31 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame^] | 32 | 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 Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 36 | |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 37 | Tempest is not tied to any single test runner, but Nose been the most commonly |
| 38 | used tool. After setting up your configuration file, you can execute |
| 39 | the set of Tempest tests by using ``nosetests`` :: |
Brian Lamar | 930fc5b | 2011-12-08 11:51:26 -0500 | [diff] [blame] | 40 | $> nosetests tempest |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 41 | |
nayna-patel | ddb489c | 2012-11-13 22:06:45 +0000 | [diff] [blame] | 42 | To run one single test :: |
| 43 | $> nosetests -sv tempest.tests.compute.servers.test_server_actions.py: |
| 44 | ServerActionsTestJSON.test_rebuild_nonexistent_server |
| 45 | |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 46 | Configuration |
| 47 | ------------- |
| 48 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame^] | 49 | Detailed configuration of tempest is beyond the scope of this |
| 50 | document. The etc/tempest.conf.sample attempts to be a self |
| 51 | documenting version of the configuration. |
| 52 | |
| 53 | The most important pieces that are needed are the user ids, openstack |
| 54 | endpoints, and basic flavors and images needed to run tests. |
Daryl Walleck | e36f623 | 2012-03-06 00:21:45 -0600 | [diff] [blame] | 55 | |
| 56 | Common Issues |
| 57 | ------------- |
| 58 | |
| 59 | Tempest was originally designed to primarily run against a full OpenStack |
| 60 | deployment. Due to that focus, some issues may occur when running Tempest |
| 61 | against devstack. |
| 62 | |
| 63 | Running Tempest, especially in parallel, against a devstack instance may |
| 64 | cause requests to be rate limited, which will cause unexpected failures. |
| 65 | Given the number of requests Tempest can make against a cluster, rate limiting |
| 66 | should be disabled for all test accounts. |
| 67 | |
| 68 | Additionally, devstack only provides a single image which Nova can use. |
| 69 | For the moment, the best solution is to provide the same image uuid for |
| 70 | both image_ref and image_ref_alt. Tempest will skip tests as needed if it |
| 71 | detects that both images are the same. |