"Tempest" OpenStack Automated test components Tempest and automated test tools nose

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.