tempest/tempest
Sean Dague 31a57adccc 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
2013-05-10 14:20:28 -04:00
..
common Finish up flake8 conversion. 2013-05-01 14:04:07 -04:00
openstack Migrate to pbr from openstack.common.setup. 2013-05-01 14:04:27 -04:00
services Update service test case - V3 2013-05-06 05:15:47 +00:00
tests Do super()'s tearDowns last (bug 1178337) 2013-05-09 12:02:49 -05:00
README.rst proposal for tempest directory restructure 2013-05-10 14:20:28 -04:00
__init__.py Changes the namespace from storm to tempest, as well as adding addition tests and improvements 2011-12-06 16:48:03 -06:00
clients.py Update service test case - V3 2013-05-06 05:15:47 +00:00
config.py Merge "change test_register_http_image to use explicit url" 2013-05-07 16:09:24 +00:00
exceptions.py Catching new exception while disassociating a disassociated floating ip 2013-02-28 11:05:52 +08:00
manager.py Add a volume from snapshot test case 2013-02-05 09:15:36 +01:00
test.py Fix status_timeout incorrectly referencing self 2013-04-26 12:58:42 +02:00
testboto.py Finish up flake8 conversion. 2013-05-01 14:04:07 -04:00
whitebox.py fix E122 and E126 flake8 issues 2013-04-15 08:33:06 -04:00

README.rst

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.