3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MOS9.0 上で Rally + Tempest を使用した機能テストの実施手順

Last updated at Posted at 2016-07-15

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 - openstack-dev@lists.openstack.org 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

rally.png

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?