使用tempest测试openstack

本文档介绍了如何安装并使用tempest测试OpenStack。首先,通过git克隆tempest项目,然后安装相关依赖,如python setup.py、pip install -r requirements.txt和tox。接着,使用tox -egenconfig生成配置文件,并根据文档编辑tempest.conf。配置包括默认设置、认证信息、计算、网络等模块。最后,通过nosetests执行特定的测试案例,如tempest/api/identity/v3/test_projects.py。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用tempest测试openstack



安装与使用参考文档  http://docs.OpenStack.org/developer/tempest/overview.html#

下载tempest

  1. # git clone https://github.com/openstack/tempest.git  
  2. # cd tempest   
  3. # python setup.py install  
  4. # pip install -r requirements.txt  
生成配置文件
  1. # pip install tox  
  2. # tox -egenconfig    
  3. # cp etc/{tempest.conf.sample,tempest.conf}  

编辑tempest.conf 文件

参考文档  http://docs.openstack.org/developer/tempest/configuration.html#tempest-configuration

  1. [root@localhost tempest]# grep ^[^#] etc/tempest.conf  
  2. [DEFAULT]  
  3. [alarming]  
  4. [auth]  
  5. use_dynamic_credentials = true  
  6. tempest_roles = admin  
  7. admin_username = admin  
  8. admin_project_name = admin  
  9. admin_password = admin  
  10. admin_domain_name = default  
  11. [baremetal]  
  12. [compute]  
  13. image_ref = CentOS-7-x86_64  
  14. flavor_ref = 1  
  15. flavor_ref_alt = 2  
  16. [compute-feature-enabled]  
  17. [dashboard]  
  18. dashboard_url = http://192.168.132.250/  
  19. login_url = http://192.168.132.250/auth/login/  
  20. [data-processing]  
  21. catalog_type = identity  
  22. [data-processing-feature-enabled]  
  23. [database]  
  24. [debug]  
  25. [identity]  
  26. uri = http://192.168.132.250:5000/v3  
  27. uri_v3 = http://192.168.132.250:5000/v3  
  28. auth_version = v3  
  29. username = admin  
  30. project_name = admin  
  31. in_role = admin  
  32. password = admin  
  33. domain_name = default  
  34. default_domain_id = default  
  35. [identity-feature-enabled]  
  36. api_v3 = true  
  37. [image]  
  38. [image-feature-enabled]  
  39. [input-scenario]  
  40. [negative]  
  41. [network]  
  42. [network-feature-enabled]  
  43. [object-storage]  
  44. [object-storage-feature-enabled]  
  45. [orchestration]  
  46. [oslo_concurrency]  
  47. [scenario]  
  48. [service_available]  
  49. [stress]  
  50. [telemetry]  
  51. [telemetry-feature-enabled]  
  52. [validation]  
  53. [volume]  
  54. [volume-feature-enabled]  

运行测试

执行所有测试

nosetests tempest
执行某一个包下的测试
nosetests tempest/tests/identity
执行一个测试代码
  1. nosetests tempest/api/identity/v3/test_projects.py 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值