blob: 18c7cf38ee238e5cd273172ea87a2e9524b8ba1b [file] [log] [blame]
Attila Fazekas58d23302013-07-24 10:25:02 +02001============================
Sean Dague7679b482013-05-24 08:49:44 -04002Tempest Field Guide Overview
Attila Fazekas58d23302013-07-24 10:25:02 +02003============================
Sean Dague31a57ad2013-05-07 15:24:05 -04004
5Tempest is designed to be useful for a large number of different
6environments. This includes being useful for gating commits to
7OpenStack core projects, being used to validate OpenStack cloud
8implementations for both correctness, as well as a burn in tool for
9OpenStack clouds.
10
11As such Tempest tests come in many flavors, each with their own rules
12and guidelines. Below is the proposed Havana restructuring for Tempest
13to make this clear.
14
Xiao Hanyua4036d12013-06-19 14:12:23 +080015| tempest/
16| api/ - API tests
17| cli/ - CLI tests
18| scenario/ - complex scenario tests
19| stress/ - stress tests
20| thirdparty/ - 3rd party api tests
Sean Dague31a57ad2013-05-07 15:24:05 -040021
22Each of these directories contains different types of tests. What
23belongs in each directory, the rules and examples for good tests, are
24documented in a README.rst file in the directory.
25
26
Sean Dague31a57ad2013-05-07 15:24:05 -040027api
Attila Fazekas58d23302013-07-24 10:25:02 +020028---
Sean Dague31a57ad2013-05-07 15:24:05 -040029
30API tests are validation tests for the OpenStack API. They should not
31use the existing python clients for OpenStack, but should instead use
32the tempest implementations of clients. This allows us to test both
33XML and JSON. Having raw clients also lets us pass invalid JSON and
34XML to the APIs and see the results, something we could not get with
35the native clients.
36
37When it makes sense, API testing should be moved closer to the
38projects themselves, possibly as functional tests in their unit test
39frameworks.
40
Sean Dague31a57ad2013-05-07 15:24:05 -040041
42cli
Attila Fazekas58d23302013-07-24 10:25:02 +020043---
Sean Dague31a57ad2013-05-07 15:24:05 -040044
45CLI tests use the openstack CLI to interact with the OpenStack
46cloud. CLI testing in unit tests is somewhat difficult because unlike
47server testing, there is no access to server code to
48instantiate. Tempest seems like a logical place for this, as it
49prereqs having a running OpenStack cloud.
50
Sean Dague31a57ad2013-05-07 15:24:05 -040051
52scenario
Attila Fazekas58d23302013-07-24 10:25:02 +020053--------
Sean Dague31a57ad2013-05-07 15:24:05 -040054
55Scenario tests are complex "through path" tests for OpenStack
56functionality. They are typically a series of steps where complicated
57state requiring multiple services is set up exercised, and torn down.
58
59Scenario tests can and should use the OpenStack python clients.
60
Sean Dague31a57ad2013-05-07 15:24:05 -040061
62stress
Attila Fazekas58d23302013-07-24 10:25:02 +020063------
Sean Dague31a57ad2013-05-07 15:24:05 -040064
Marc Koderera58e8512014-07-17 10:40:23 +020065Stress tests are designed to stress an OpenStack environment by running a high
66workload against it and seeing what breaks. The stress test framework runs
67several test jobs in parallel and can run any existing test in Tempest as a
68stress job.
Sean Dague31a57ad2013-05-07 15:24:05 -040069
Sean Dague09761f62013-05-13 15:20:40 -040070thirdparty
Attila Fazekas58d23302013-07-24 10:25:02 +020071----------
Sean Dague09761f62013-05-13 15:20:40 -040072
73Many openstack components include 3rdparty API support. It is
ravikumar-venkatesanbae88e12013-06-07 23:02:19 +000074completely legitimate for Tempest to include tests of 3rdparty APIs,
75but those should be kept separate from the normal OpenStack
Sean Dague09761f62013-05-13 15:20:40 -040076validation.