blob: fec28740ec3f47d37485d0fca3206d8088a0b943 [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
Xiao Hanyua4036d12013-06-19 14:12:23 +080017| scenario/ - complex scenario tests
18| stress/ - stress tests
19| thirdparty/ - 3rd party api tests
Sean Dague31a57ad2013-05-07 15:24:05 -040020
21Each of these directories contains different types of tests. What
22belongs in each directory, the rules and examples for good tests, are
23documented in a README.rst file in the directory.
24
Matthew Treinisha9aef872014-07-25 16:03:08 -040025:ref:`api_field_guide`
26----------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040027
28API tests are validation tests for the OpenStack API. They should not
29use the existing python clients for OpenStack, but should instead use
30the tempest implementations of clients. This allows us to test both
31XML and JSON. Having raw clients also lets us pass invalid JSON and
32XML to the APIs and see the results, something we could not get with
33the native clients.
34
35When it makes sense, API testing should be moved closer to the
36projects themselves, possibly as functional tests in their unit test
37frameworks.
38
Sean Dague31a57ad2013-05-07 15:24:05 -040039
Matthew Treinisha9aef872014-07-25 16:03:08 -040040:ref:`scenario_field_guide`
41---------------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040042
43Scenario tests are complex "through path" tests for OpenStack
44functionality. They are typically a series of steps where complicated
45state requiring multiple services is set up exercised, and torn down.
46
ghanshyam50f19472014-11-26 17:04:37 +090047Scenario tests should not use the existing python clients for OpenStack,
48but should instead use the tempest implementations of clients.
Sean Dague31a57ad2013-05-07 15:24:05 -040049
Sean Dague31a57ad2013-05-07 15:24:05 -040050
Matthew Treinisha9aef872014-07-25 16:03:08 -040051:ref:`stress_field_guide`
52-------------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040053
Marc Koderera58e8512014-07-17 10:40:23 +020054Stress tests are designed to stress an OpenStack environment by running a high
55workload against it and seeing what breaks. The stress test framework runs
56several test jobs in parallel and can run any existing test in Tempest as a
57stress job.
Sean Dague31a57ad2013-05-07 15:24:05 -040058
Matthew Treinisha9aef872014-07-25 16:03:08 -040059:ref:`third_party_field_guide`
60-----------------------------
Sean Dague09761f62013-05-13 15:20:40 -040061
62Many openstack components include 3rdparty API support. It is
ravikumar-venkatesanbae88e12013-06-07 23:02:19 +000063completely legitimate for Tempest to include tests of 3rdparty APIs,
64but those should be kept separate from the normal OpenStack
Sean Dague09761f62013-05-13 15:20:40 -040065validation.
Matthew Treinish817a8082014-07-25 16:07:20 -040066
67:ref:`unit_tests_field_guide`
68-----------------------------
69
70Unit tests are the self checks for Tempest. They provide functional
71verification and regression checking for the internal components of tempest.
72They should be used to just verify that the individual pieces of tempest are
73working as expected.