MOS9.0에서 Rally + Tempest를 사용한 기능 테스트 구현 절차

Mitaka 기반 Mirantis OpenStack (이하 MOS) 9.0에서
Rally + Tempest를 사용하여 OpenStack 기능 테스트를 수행하는 방법을 설명합니다.

사전 작업


  • fuel에서 Env를 만들고 OpenStack 환경을 배포합니다.
  • fuel master 노드에서 다음 명령을 실행하여 fuel 노드가 성공적으로 배포되었는지 확인합니다.
  • $ fuel node
    id | status | name         | cluster | ip        | mac               | roles           | pending_roles | online | group_id
    ---+--------+--------------+---------+-----------+-------------------+-----------------+---------------+--------+---------
     2 | ready  | controller01 |       1 | 10.20.0.7 | 00:26:2d:0a:ba:3e | controller      |               |      1 |        1
     3 | ready  | compute01    |       1 | 10.20.0.8 | 00:26:2d:0a:b9:78 | cinder, compute |               |      1 |        1
     4 | ready  | compute02    |       1 | 10.20.0.3 | 00:26:2d:0a:bc:42 | cinder, compute |               |      1 |        1
    
  • controller 노드에서 다음 명령을 실행하여 Tempest 실행 환경을 설정합니다.
  • $ apt-get install git
    
    $ git clone https://github.com/obutenko/mos-rally-verify.git
    
    $ cd mos-rally-verify
    
    $ ./prepare_env.sh
    <省略>
    + docker exec -ti e11893b3a265 bash
    -e Welcome to Rally Docker container!
        Rally certification tasks, samples and docs are located at /opt/rally/
        Rally at readthedocs - http://rally.readthedocs.org
        How to contribute - http://rally.readthedocs.org/en/latest/contribute.html
        If you have any questions, you can reach the Rally team by:
          * e-mail - [email protected] with tag [Rally] in subject
          * irc - "#openstack-rally" channel at freenode.net
    

    테스트 실시


  • Rally를 사용하여 모든 기능 테스트를 실행합니다.
  • $ . openrc
    
    $ rally verify start
    <省略>
    {1} tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name [0.323399s] ... ok
    {1} tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers [0.197872s] ... ok
    {1} tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers_with_detail [1.030122s] ... ok
    {1} tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_created_server_vcpus [0.369249s] ... ok
    <省略>
    ======
    Totals
    ======
    Ran: 1546 tests in 14753.0000 sec.
     - Passed: 1473
     - Skipped: 64
     - Expected Fail: 0
     - Unexpected Success: 0
     - Failed: 9
    Sum of execute time for each test: 16094.4310 sec.
    
    ==============
    Worker Balance
    ==============
     - Worker 0 (786 tests) => 4:05:17.940086
     - Worker 1 (760 tests) => 3:32:49.632457
    2016-07-14 12:30:35.435 584 INFO rally.verification.tempest.tempest [-] Test run has been finished with errors. Check logs for details.
    2016-07-14 12:30:35.437 584 INFO rally.verification.tempest.tempest [-] Verification 45e06aed-44d8-43fa-a52b-9e4ed037f252 | Completed: Run verification.
    2016-07-14 12:30:35.437 584 INFO rally.verification.tempest.tempest [-] Verification 45e06aed-44d8-43fa-a52b-9e4ed037f252 | Starting:  Saving verification results.
    2016-07-14 12:30:41.311 584 INFO rally.verification.tempest.tempest [-] Verification 45e06aed-44d8-43fa-a52b-9e4ed037f252 | Completed: Saving verification results.
    Verification UUID: 45e06aed-44d8-43fa-a52b-9e4ed037f252
    
    --regex 옵션을 추가하여 특정 테스트만 실행할 수 있습니다.
    $ rally verify start --regex tempest.api.identity.admin.test_roles.RolesTestJSON.test_list_roles
    

    결과 출력



    다음 명령을 사용하면 html 형식으로 결과를 출력할 수 있습니다.
    $ rally verify results --html --output-file tempest-report.html
    

    좋은 웹페이지 즐겨찾기