blob: c9a049190672b85d674047dfb4058e567e620a32 [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
Sean Dague31a57ad2013-05-07 15:24:05 -040019
20Each of these directories contains different types of tests. What
21belongs in each directory, the rules and examples for good tests, are
22documented in a README.rst file in the directory.
23
Matthew Treinisha9aef872014-07-25 16:03:08 -040024:ref:`api_field_guide`
25----------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040026
27API tests are validation tests for the OpenStack API. They should not
28use the existing python clients for OpenStack, but should instead use
guo yunxiana2216472016-08-01 16:34:43 +080029the tempest implementations of clients. Having raw clients let us
30pass invalid JSON to the APIs and see the results, something we could
31not get with the native clients.
Sean Dague31a57ad2013-05-07 15:24:05 -040032
33When it makes sense, API testing should be moved closer to the
34projects themselves, possibly as functional tests in their unit test
35frameworks.
36
Sean Dague31a57ad2013-05-07 15:24:05 -040037
Matthew Treinisha9aef872014-07-25 16:03:08 -040038:ref:`scenario_field_guide`
39---------------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040040
41Scenario tests are complex "through path" tests for OpenStack
42functionality. They are typically a series of steps where complicated
43state requiring multiple services is set up exercised, and torn down.
44
ghanshyam50f19472014-11-26 17:04:37 +090045Scenario tests should not use the existing python clients for OpenStack,
46but should instead use the tempest implementations of clients.
Sean Dague31a57ad2013-05-07 15:24:05 -040047
Sean Dague31a57ad2013-05-07 15:24:05 -040048
Matthew Treinisha9aef872014-07-25 16:03:08 -040049:ref:`stress_field_guide`
50-------------------------
Sean Dague31a57ad2013-05-07 15:24:05 -040051
Marc Koderera58e8512014-07-17 10:40:23 +020052Stress tests are designed to stress an OpenStack environment by running a high
53workload against it and seeing what breaks. The stress test framework runs
54several test jobs in parallel and can run any existing test in Tempest as a
55stress job.
Sean Dague31a57ad2013-05-07 15:24:05 -040056
Matthew Treinish817a8082014-07-25 16:07:20 -040057:ref:`unit_tests_field_guide`
58-----------------------------
59
60Unit tests are the self checks for Tempest. They provide functional
61verification and regression checking for the internal components of tempest.
62They should be used to just verify that the individual pieces of tempest are
63working as expected.