使用tempest测试openstack

本文介绍如何安装和配置 OpenStack 的 Tempest 自动化测试工具,包括生成配置文件、编辑配置项以及运行测试的方法。


安装与使用参考文档  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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值