安装与使用参考文档 http://docs.openstack.org/developer/tempest/overview.html#
下载tempest
# git clone https://github.com/openstack/tempest.git
# cd tempest
<pre class="html" name="code"># pip install -r requirements.txt
# python setup.py install
生成配置文件# pip install tox
# tox -egenconfig
# cp etc/{tempest.conf.sample,tempest.conf}
编辑tempest.conf 文件
参考文档 http://docs.openstack.org/developer/tempest/configuration.html#tempest-configuration
[root@localhost tempest]# grep ^[^#] etc/tempest.conf
[DEFAULT]
[alarming]
[auth]
use_dynamic_credentials = true
tempest_roles = admin
admin_username = admin
admin_project_name = admin
admin_password = admin
admin_domain_name = default
[baremetal]
[compute]
image_ref = CentOS-7-x86_64
flavor_ref = 1
flavor_ref_alt = 2
[compute-feature-enabled]
[dashboard]
dashboard_url = http://192.168.132.250/
login_url = http://192.168.132.250/auth/login/
[data-processing]
catalog_type = identity
[data-processing-feature-enabled]
[database]
[debug]
[identity]
uri = http://192.168.132.250:5000/v3
uri_v3 = http://192.168.132.250:5000/v3
auth_version = v3
username = admin
project_name = admin
in_role = admin
password = admin
domain_name = default
default_domain_id = default
[identity-feature-enabled]
api_v3 = true
[image]
[image-feature-enabled]
[input-scenario]
[negative]
[network]
[network-feature-enabled]
[object-storage]
[object-storage-feature-enabled]
[orchestration]
[oslo_concurrency]
[scenario]
[service_available]
[stress]
[telemetry]
[telemetry-feature-enabled]
[validation]
[volume]
[volume-feature-enabled]运行测试
执行所有测试
nosetests tempest执行某一个包下的测试
nosetests tempest/tests/identity执行一个测试代码
nosetests tempest/api/identity/v3/test_projects.py
本文介绍如何安装和配置 OpenStack 的 Tempest 自动化测试工具,包括生成配置文件、编辑配置项以及运行测试的方法。
2236

被折叠的 条评论
为什么被折叠?



