Sean Dague | 7679b48 | 2013-05-24 08:49:44 -0400 | [diff] [blame] | 1 | ============ |
| 2 | Tempest Field Guide Overview |
| 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 | |
| 15 | tempest/ |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 16 | api/ - API tests |
| 17 | cli/ - CLI tests |
| 18 | scenario/ - complex scenario tests |
| 19 | stress/ - stress tests |
Sean Dague | 09761f6 | 2013-05-13 15:20:40 -0400 | [diff] [blame] | 20 | thirdparty/ - 3rd party api tests |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 21 | whitebox/ - white box testing |
| 22 | |
| 23 | Each of these directories contains different types of tests. What |
| 24 | belongs in each directory, the rules and examples for good tests, are |
| 25 | documented in a README.rst file in the directory. |
| 26 | |
| 27 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 28 | api |
| 29 | ------------ |
| 30 | |
| 31 | API tests are validation tests for the OpenStack API. They should not |
| 32 | use the existing python clients for OpenStack, but should instead use |
| 33 | the tempest implementations of clients. This allows us to test both |
| 34 | XML and JSON. Having raw clients also lets us pass invalid JSON and |
| 35 | XML to the APIs and see the results, something we could not get with |
| 36 | the native clients. |
| 37 | |
| 38 | When it makes sense, API testing should be moved closer to the |
| 39 | projects themselves, possibly as functional tests in their unit test |
| 40 | frameworks. |
| 41 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 42 | |
| 43 | cli |
| 44 | ------------ |
| 45 | |
| 46 | CLI tests use the openstack CLI to interact with the OpenStack |
| 47 | cloud. CLI testing in unit tests is somewhat difficult because unlike |
| 48 | server testing, there is no access to server code to |
| 49 | instantiate. Tempest seems like a logical place for this, as it |
| 50 | prereqs having a running OpenStack cloud. |
| 51 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 52 | |
| 53 | scenario |
| 54 | ------------ |
| 55 | |
| 56 | Scenario tests are complex "through path" tests for OpenStack |
| 57 | functionality. They are typically a series of steps where complicated |
| 58 | state requiring multiple services is set up exercised, and torn down. |
| 59 | |
| 60 | Scenario tests can and should use the OpenStack python clients. |
| 61 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 62 | |
| 63 | stress |
| 64 | ----------- |
| 65 | |
| 66 | Stress tests are designed to stress an OpenStack environment by |
| 67 | running a high workload against it and seeing what breaks. Tools may |
| 68 | be provided to help detect breaks (stack traces in the logs). |
| 69 | |
| 70 | TODO: old stress tests deleted, new_stress that david is working on |
| 71 | moves into here. |
| 72 | |
| 73 | |
Sean Dague | 09761f6 | 2013-05-13 15:20:40 -0400 | [diff] [blame] | 74 | thirdparty |
| 75 | ------------ |
| 76 | |
| 77 | Many openstack components include 3rdparty API support. It is |
ravikumar-venkatesan | bae88e1 | 2013-06-07 23:02:19 +0000 | [diff] [blame] | 78 | completely legitimate for Tempest to include tests of 3rdparty APIs, |
| 79 | but those should be kept separate from the normal OpenStack |
Sean Dague | 09761f6 | 2013-05-13 15:20:40 -0400 | [diff] [blame] | 80 | validation. |
| 81 | |
Sean Dague | 09761f6 | 2013-05-13 15:20:40 -0400 | [diff] [blame] | 82 | |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 83 | whitebox |
| 84 | ---------- |
| 85 | |
| 86 | Whitebox tests are tests which require access to the database of the |
ravikumar-venkatesan | bae88e1 | 2013-06-07 23:02:19 +0000 | [diff] [blame] | 87 | target OpenStack machine to verify internal state after operations |
Sean Dague | 31a57ad | 2013-05-07 15:24:05 -0400 | [diff] [blame] | 88 | are made. White box tests are allowed to use the python clients. |