使用tempest测试openstack
安装与使用参考文档 http://docs.OpenStack.org/developer/tempest/overview.html#
下载tempest
- # git clone https://github.com/openstack/tempest.git
- # cd tempest
- # python setup.py install
- # pip install -r requirements.txt
- # 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