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