blob: 0b080fe81513ea89bd4e781e92277fa63a98d94b [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
42TODO: The bulk of tempest/tests should move to tempest/api
43
44
45cli
46------------
47
48CLI tests use the openstack CLI to interact with the OpenStack
49cloud. CLI testing in unit tests is somewhat difficult because unlike
50server testing, there is no access to server code to
51instantiate. Tempest seems like a logical place for this, as it
52prereqs having a running OpenStack cloud.
53
54TODO: the top level cli directory moves to tempest/cli
55
56
57scenario
58------------
59
60Scenario tests are complex "through path" tests for OpenStack
61functionality. They are typically a series of steps where complicated
62state requiring multiple services is set up exercised, and torn down.
63
64Scenario tests can and should use the OpenStack python clients.
65
66TODO: tests/network/test_network_basic_ops.py,
67tests/compute/servers/*_ops.py should move to tempest/scenario (others)
68
69
70stress
71-----------
72
73Stress tests are designed to stress an OpenStack environment by
74running a high workload against it and seeing what breaks. Tools may
75be provided to help detect breaks (stack traces in the logs).
76
77TODO: old stress tests deleted, new_stress that david is working on
78moves into here.
79
80
Sean Dague09761f62013-05-13 15:20:40 -040081thirdparty
82------------
83
84Many openstack components include 3rdparty API support. It is
85completely legitmate for Tempest to include tests of 3rdparty APIs,
86but those should be kept seperate from the normal OpenStack
87validation.
88
89TODO: tempest/tests/boto should become tempest/3rdparty/boto
90
91
Sean Dague31a57ad2013-05-07 15:24:05 -040092whitebox
93----------
94
95Whitebox tests are tests which require access to the database of the
96target OpenStack machine to verify internal state after opperations
97are made. White box tests are allowed to use the python clients.
98
99TODO: collect out whitebox tests to this location.