diff options
author | Matthew Treinish <treinish@linux.vnet.ibm.com> | 2013-12-06 18:23:54 +0000 |
---|---|---|
committer | Matthew Treinish <treinish@linux.vnet.ibm.com> | 2013-12-06 20:00:13 +0000 |
commit | ecf212c49fcec8b49dfe5ed382053d65078f46c5 (patch) | |
tree | 00ed3695241f95f6520070f5bd28655c989aab56 /HACKING.rst | |
parent | 3ba85a2ae5ebe733b4e630a7d6c76d8171eb7ff0 (diff) | |
download | tempest-ecf212c49fcec8b49dfe5ed382053d65078f46c5.tar.gz |
Update tempest hacking regarding unit tests
This commit just updates some of the hacking documentation around unit
tests. It also adds a new hacking rule to ensure that setUpClass isn't
used for the unit tests.
Partially implements bp unit-tests
Change-Id: Ie8b1c9f1312a467265d53bc28ee905fa1b5fbb53
Diffstat (limited to 'HACKING.rst')
-rw-r--r-- | HACKING.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/HACKING.rst b/HACKING.rst index a74ff7334..108307546 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -9,8 +9,8 @@ Tempest Specific Commandments ------------------------------ - [T102] Cannot import OpenStack python clients in tempest/api tests -- [T103] tempest/tests is deprecated - [T104] Scenario tests require a services decorator +- [T105] Unit tests cannot use setUpClass Test Data/Configuration ----------------------- @@ -192,3 +192,15 @@ Sample Configuration File The sample config file is autogenerated using a script. If any changes are made to the config variables in tempest then the sample config file must be regenerated. This can be done running the script: tools/generate_sample.sh + +Unit Tests +---------- +Unit tests are a separate class of tests in tempest. They verify tempest +itself, and thus have a different set of guidelines around them: + +1. They can not require anything running externally. All you should need to + run the unit tests is the git tree, python and the dependencies installed. + This includes running services, a config file, etc. + +2. The unit tests cannot use setUpClass, instead fixtures and testresources + should be used for shared state between tests. |