proposal for tempest directory restructure

This is the text of a proposal for tempest directory restructure,
largely coming out of OpenStack summit. Once this has gotten core
sign off, I'llstart implementing the refactors into those
directories, and each will have a more specific README explaining
good tests in that kind of environment.

This proposal doesn't attempt to layout structure for tests we
don't have yet, this is entirely about organizing what we have into
something easier to understand. It is assumed new classes of tests
will get proposed over time, and we'll take them as they come.

Part of bp:tempest-repo-restructure

Change-Id: Ib8c55602b085622d322676ba2c24d9719fb9737d
This commit is contained in:
Sean Dague 2013-05-07 15:24:05 -04:00
parent 6dbb27cf32
commit 31a57adccc
1 changed files with 98 additions and 0 deletions

98
tempest/README.rst Normal file
View File

@ -0,0 +1,98 @@
Tempest Field Guide
-----------
Tempest is designed to be useful for a large number of different
environments. This includes being useful for gating commits to
OpenStack core projects, being used to validate OpenStack cloud
implementations for both correctness, as well as a burn in tool for
OpenStack clouds.
As such Tempest tests come in many flavors, each with their own rules
and guidelines. Below is the proposed Havana restructuring for Tempest
to make this clear.
tempest/
3rdparty/ - 3rd party api tests
api/ - API tests
cli/ - CLI tests
scenario/ - complex scenario tests
stress/ - stress tests
whitebox/ - white box testing
Each of these directories contains different types of tests. What
belongs in each directory, the rules and examples for good tests, are
documented in a README.rst file in the directory.
3rdparty
------------
Many openstack components include 3rdparty API support. It is
completely legitmate for Tempest to include tests of 3rdparty APIs,
but those should be kept seperate from the normal OpenStack
validation.
TODO: tempest/tests/boto should become tempest/3rdparty/boto
api
------------
API tests are validation tests for the OpenStack API. They should not
use the existing python clients for OpenStack, but should instead use
the tempest implementations of clients. This allows us to test both
XML and JSON. Having raw clients also lets us pass invalid JSON and
XML to the APIs and see the results, something we could not get with
the native clients.
When it makes sense, API testing should be moved closer to the
projects themselves, possibly as functional tests in their unit test
frameworks.
TODO: The bulk of tempest/tests should move to tempest/api
cli
------------
CLI tests use the openstack CLI to interact with the OpenStack
cloud. CLI testing in unit tests is somewhat difficult because unlike
server testing, there is no access to server code to
instantiate. Tempest seems like a logical place for this, as it
prereqs having a running OpenStack cloud.
TODO: the top level cli directory moves to tempest/cli
scenario
------------
Scenario tests are complex "through path" tests for OpenStack
functionality. They are typically a series of steps where complicated
state requiring multiple services is set up exercised, and torn down.
Scenario tests can and should use the OpenStack python clients.
TODO: tests/network/test_network_basic_ops.py,
tests/compute/servers/*_ops.py should move to tempest/scenario (others)
stress
-----------
Stress tests are designed to stress an OpenStack environment by
running a high workload against it and seeing what breaks. Tools may
be provided to help detect breaks (stack traces in the logs).
TODO: old stress tests deleted, new_stress that david is working on
moves into here.
whitebox
----------
Whitebox tests are tests which require access to the database of the
target OpenStack machine to verify internal state after opperations
are made. White box tests are allowed to use the python clients.
TODO: collect out whitebox tests to this location.