The baby's heart is bitter, but the baby can only in this backcountry said, next week will open the group would have to do something. This is the experimental part of the paper, the main use of OpenStack in the automated test components Tempest, the specific reasons do not elaborate.
Installation
Two methods of installation, one is to use Devstack directly to install OpenStack, so that Tempest will be automatically installed by the script, direct use is very convenient, but the problem is that you can successfully run Devstack, Anyway, it took me a day or two. Solve countless problems before successful installation and take a snapshot immediately (wit me). The second is to take (pseudo) distributed OpenStack and install Tempest yourself, this is more troublesome, need to manually download the Tempest git repository and execute Python setup.py, here is a good document:/HTTP Www.ibm.com/developerworks/cn/cloud/library/1403_liuyu_openstacktempest/IBM produced, must be a boutique.
Nose module
First you need to install the nose module, the installation process is as follows:
Pip Install nose
or Easy_install nose
or Python setup.py install
Let's say you have successfully installed nose, then build a test folder, create a new test.py, and then enter the following:
def Testfunc (): a=0 b=2 assert a==b
Then execute the nosetests in the directory, with the following results:
Why only input nosetests automatically executes the test.py in the directory and executes the TESTFUNC function inside, because nose automatically recognizes the test cases in the directory, any conforming regular expressions (?: ^| [b_.-]) [Tt]est classes, functions, files, or directories, as well as testcase, will be recognized and executed.
Tempest
Operation and test report:
Execute Tempest All test Cases
Nosetests Tempest
Execute all test cases under a tempest package, such as all test cases under the identity package
Nosetests tempest/tests/identity
Execute Tempest A test case, such as test_tenants.py under identity package
Nosetests tempest/api/identity/admin/test_tenants.py
"Tempest" OpenStack Automated test components Tempest and automated test tools nose