Attila Fazekas | 58d2330 | 2013-07-24 10:25:02 +0200 | [diff] [blame] | 1 | ============================ |
Sean Dague | 7679b48 | 2013-05-24 08:49:44 -0400 | [diff] [blame] | 2 | Tempest Field Guide Overview |
Attila Fazekas | 58d2330 | 2013-07-24 10:25:02 +0200 | [diff] [blame] | 3 | ============================ |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 4 | |
| 5 | Tempest is designed to be useful for a large number of different |
| 6 | environments. This includes being useful for gating commits to |
| 7 | OpenStack core projects, being used to validate OpenStack cloud |
| 8 | implementations for both correctness, as well as a burn in tool for |
| 9 | OpenStack clouds. |
| 10 | |
| 11 | As such Tempest tests come in many flavors, each with their own rules |
| 12 | and guidelines. Below is the proposed Havana restructuring for Tempest |
| 13 | to make this clear. |
| 14 | |
Xiao Hanyu | a4036d1 | 2013-06-19 14:12:23 +0800 | [diff] [blame] | 15 | | tempest/ |
| 16 | | api/ - API tests |
Xiao Hanyu | a4036d1 | 2013-06-19 14:12:23 +0800 | [diff] [blame] | 17 | | scenario/ - complex scenario tests |
| 18 | | stress/ - stress tests |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 19 | |
| 20 | Each of these directories contains different types of tests. What |
| 21 | belongs in each directory, the rules and examples for good tests, are |
| 22 | documented in a README.rst file in the directory. |
| 23 | |
Matthew Treinish | a9aef87 | 2014-07-25 16:03:08 -0400 | [diff] [blame] | 24 | :ref:`api_field_guide` |
| 25 | ---------------------- |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 26 | |
| 27 | API tests are validation tests for the OpenStack API. They should not |
| 28 | use the existing python clients for OpenStack, but should instead use |
guo yunxian | a221647 | 2016-08-01 16:34:43 +0800 | [diff] [blame] | 29 | the tempest implementations of clients. Having raw clients let us |
| 30 | pass invalid JSON to the APIs and see the results, something we could |
| 31 | not get with the native clients. |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 32 | |
| 33 | When it makes sense, API testing should be moved closer to the |
| 34 | projects themselves, possibly as functional tests in their unit test |
| 35 | frameworks. |
| 36 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 37 | |
Matthew Treinish | a9aef87 | 2014-07-25 16:03:08 -0400 | [diff] [blame] | 38 | :ref:`scenario_field_guide` |
| 39 | --------------------------- |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 40 | |
| 41 | Scenario tests are complex "through path" tests for OpenStack |
| 42 | functionality. They are typically a series of steps where complicated |
| 43 | state requiring multiple services is set up exercised, and torn down. |
| 44 | |
ghanshyam | 50f1947 | 2014-11-26 17:04:37 +0900 | [diff] [blame] | 45 | Scenario tests should not use the existing python clients for OpenStack, |
| 46 | but should instead use the tempest implementations of clients. |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 47 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 48 | |
Matthew Treinish | a9aef87 | 2014-07-25 16:03:08 -0400 | [diff] [blame] | 49 | :ref:`stress_field_guide` |
| 50 | ------------------------- |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 51 | |
Marc Koderer | a58e851 | 2014-07-17 10:40:23 +0200 | [diff] [blame] | 52 | Stress tests are designed to stress an OpenStack environment by running a high |
| 53 | workload against it and seeing what breaks. The stress test framework runs |
| 54 | several test jobs in parallel and can run any existing test in Tempest as a |
| 55 | stress job. |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 56 | |
Matthew Treinish | 817a808 | 2014-07-25 16:07:20 -0400 | [diff] [blame] | 57 | :ref:`unit_tests_field_guide` |
| 58 | ----------------------------- |
| 59 | |
| 60 | Unit tests are the self checks for Tempest. They provide functional |
| 61 | verification and regression checking for the internal components of tempest. |
| 62 | They should be used to just verify that the individual pieces of tempest are |
| 63 | working as expected. |