1、在devstack环境上,执行
vagrant@precise64:/opt/stack/tempest/tempest/api/network$ cp /opt/stack/tempest/etc/tempest.conf.sample /opt/stack/tempest/etc/tempest.conf
vagrant@precise64:/opt/stack/tempest/tempest/api/network$ vi /opt/stack/tempest/etc/tempest.conf
2、修改如下配置
# API key to use when authenticating. (string value)
password=Galax8800
# API key to use when authenticating as admin. (string value)
admin_password=Galax8800
# Full URI of the OpenStack Identity API (Keystone), v2
# (string value)
uri=http://127.0.0.1:35357/v2.0/tokens
# API key to use when authenticating. (string value)
password=Galax8800
# Valid secondary image reference to be used in tests. (string
# value)
image_ref=cf6dcac3-f1f3-44be-9f77-e18dd65b680e
# Whether or not neutron is expected to be available (boolean
# value)
neutron=true
3、执行用例(nosetests工具)
执行一个py文件
nosetests -v tempest.api.compute.test_auth_token
执行py文件中的一个方法
nosetests -v tempest.api.compute.flavors.test_flavors:FlavorsTestJSON.test_list_flavors
执行一个特性
nosetests -v tempest.api.compute.flavors
执行所有的tempest
nosetests -v tempest
4、执行用例(testr工具)
执行一个py文件
nosetests -v tempest.api.compute.test_auth_token
执行py文件中的一个方法
nosetests -v tempest.api.compute.flavors.test_flavors:FlavorsTestJSON.test_list_flavors
执行一个特性
nosetests -v tempest.api.compute.flavors
执行所有的tempest
nosetests -v tempest
nosetests -v tempest.api.compute.admin.test_aggregates:AggregatesAdminTestJSON.test_aggregate_create_invalid_aggregate_name