Merge "add 3 new commiters and remove 2 ghost committers iMeeting minutes approving...
[functest.git] / docs / functest.rst
1 ===========================
2 OPNFV functional test guide
3 ===========================
4
5 .. contents::
6
7 ------------
8 Introduction
9 ------------
10
11 Testing is a key challenge of OPNFV.
12 It shall be possible to run functional tests on any OPNFV solution.
13
14 The goal of this document consists in
15  * a description of functional tests for OPNFV
16  * a description of the tools needed to perform these tests
17  * the procedure to configure the tools and the scenarios associated with these tests
18
19 Functional tests shall be automated (as much as possible) and collected results shall be used to improve the robustness and the reliability of the overall system.
20
21 Function tests may cover any domain that could lead to improve the OPNFV solution and define "Telco Cloud" KPI.
22
23 The last section also describes how to automate these tests within the OPNFV continuous integration project.
24
25 .. _ETSI: http://docbox.etsi.org/ISG/NFV/Open/Published/gs_NFV001v010101p%20-%20Use%20Cases.pdf
26
27 ETSI NFV defined 9 use cases (ref ETSI_):
28  * VNF as a Service
29  * NFV as a service
30  * VNF Forwarding graphs
31  * Virtual Network Platform as a Service
32  * Virtualisation of Mobile Core and IMS
33  * Virtualisation of Mobile station
34  * Fixed Access NFV
35  * Virtualization of CDNs (vCDN)
36  * Virtualization of the Home environment
37
38 .. _`Openstack Telco Working Group`: https://wiki.openstack.org/wiki/TelcoWorkingGroup
39 .. _`functest guide`: https://wiki.opnfv.org/_media/opnfv-_functest.pdf
40
41
42 Most of the use cases are also discussed in upstream projects (e.g. `Openstack Telco Working Group`_ )
43
44 For release 1 (Arno), 4 test suites have been selected:
45  * Rally Bench test suite for Openstack
46  * Openstack Tempest test suite
47  * OpenDaylight test suite
48  * vPing
49
50 The 3 first suites are directly inherited from upstream projects.
51 vPing, that is already present in Tempest suite, has been developped to provided a basic "hello world" functional test example.
52
53 .. _`Continuous Integration`: https://build.opnfv.org/ci/view/functest/
54
55 vIMS, vEPC, vPE, vHGW, vCDN, vWhatever use cases are not considered for first release.
56 It does not mean that such use cases cannot be tested on OPNFV Arno.
57 It means that these testcases have not been integrated in the `Continuous Integration`_ and no specific work (integration or developpment) have been done for the first release.
58 We may expect that new VNFs and new scenarios will be created and integrated in the future releases. See `functest guide`_ for details.
59
60 .. _prereqs:
61
62 -------------
63 Prerequisites
64 -------------
65 We assume that an OPNFV Arno solution has been installed.
66
67 .. _here: https://wiki.opnfv.org/documentation/Arno
68
69 The installation of the OPNFV solution is out of scope of this document but can be found [here_].
70 In the rest of the document the OPNFV solution would be considered as the System Under Test (SUT).
71
72 The installation and configuration of the tools needed to perform the tests will be described in the following sections.
73
74 For release 1, the tools are automatically installed, but the tests are not fully automated due to the requirement that sourcing of OpenStack credentials is required on at least one machine where tests are launched. More details will be provided in the configuration section.
75
76 .. _pharos: https://wiki.opnfv.org/pharos
77
78 It is recommended to install the different tools on the jump host server as defined in the pharos_ project.
79
80 For functest, the following libraries are needed. You can install them either with yum install or apt-get install, depending on your operating system:
81  * python-pip
82  * python-dev
83  * libffi-dev
84  * libxml2-dev
85  * libxslt1-dev
86
87 You will also need some Python modules:
88  * sudo pip install GitPython
89  * sudo pip install python-novaclient
90  * sudo pip install python-neutronclient
91  * sudo pip install python-glanceclient
92  * sudo pip install python-keystoneclient
93
94
95 The high level architecture can be described as follow::
96
97  CIMC/Lights+out management                  Admin     Private   Public   Storage
98                                               PXE
99                                                                    +
100  +                                             +     IP_PRIV/24    |        |
101  |                                             |         +         +        |
102  |                                             |         |    IP_PUB/24     |
103  |     +-----------------+                     |         |         +        |
104  |     |                 |                     |         |         |        |
105  +-----+  Jumpserver     |                     |         |         |        |
106  |     |                 +---------------------+         |         |        |
107  |     |                 |                     |         |         |        |
108  |     |  +----------+   |                     |         |         |        |
109  |     |  |  Rally   |   +---- --------------------------+         |        |
110  |     |  |          |   |                     |         |         |        |
111  |     |  |  Robot   |   |                     |         |         |        |
112  |     |  |          |   |                     |         |         |        |
113  |     |  |  vPing   |   |                     |         |         |        |
114  |     |  |          |   |                     |         |         |        |
115  |     |  | Tempest  |   |                     |         |         |        |
116  |     |  +----------+   |                     |         |         |        |
117  |     |   FuncTests     +-----------------------------------------+        |
118  |     |                 |                     |         |         |        |
119  |     |                 +--------------------------------------------------+
120  |     |                 |                     |         |         |        |
121  |     +-----------------+                     |         |         |        |
122  |                                             |         |         |        |
123  |    +----------------+                       |         |         |        |
124  |    |             1  |                       |         |         |        |
125  +----+ +--------------+-+                     |         |         |        |
126  |    | |             2  |                     |         |         |        |
127  |    | | +--------------+-+                   |         |         |        |
128  |    | | |             3  |                   |         |         |        |
129  |    | | | +--------------+-+                 |         |         |        |
130  |    | | | |             4  |                 |         |         |        |
131  |    +-+ | | +--------------+-+               |         |         |        |
132  |      | | | |             5  +---------------+         |         |        |
133  |      +-+ | |  nodes for     |               |         |         |        |
134  |        | | |  deploying     +-------------------------+         |        |
135  |        +-+ |  opnfv         |               |         |         |        |
136  |          | |     SUT        +-----------------------------------+        |
137  |          +-+                |               |         |         |        |
138  |            |                +--------------------------------------------+
139  |            +----------------+               |         |         |        |
140  |                                             |         |         |        |
141  |                                             +         +         +        +
142
143 .. _description:
144
145 -----------------------------
146 Description of the test cases
147 -----------------------------
148
149 vPing
150 =====
151
152 The goal of this test can be described as follow::
153
154  vPing testcase
155  +-------------+                   +-------------+
156  |             |                   |             |
157  |             |                   |             |
158  |             |     Boot VM1      |             |
159  |             +------------------>|             |
160  |             |                   |             |
161  |             |     Get IP VM1    |             |
162  |             +------------------>|             |
163  |   Tester    |                   |   System    |
164  |             |     Boot VM2      |    Under    |
165  |             +------------------>|     Test    |
166  |             | VM2 pings VM1     |             |
167  |             |                   |             |
168  |             | Check console log |             |
169  |             |    If ping:       |             |
170  |             |      exit OK      |             |
171  |             |    else (timeout) |             |
172  |             |      exit KO      |             |
173  |             |                   |             |
174  |             |                   |             |
175  +-------------+                   +-------------+
176
177
178 This example, using OpenStack Python clients can be considered as an "Hello World" example and may be modified for future use.
179
180 OpenDaylight
181 ============
182
183 The ODL suite consists in a set of basic tests inherited from ODL project. The suite tests the creation and deletion of network, subnet, port though OpenDaylight and Neutron.
184
185 The list of tests can be described as follow:
186  * Restconf.basic: Get the controller modules via Restconf
187  * Neutron.Networks
188
189    * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
190    * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
191    * Create Network :: Create new network in OpenStack
192    * Check Network :: Check Network created in OpenDaylight
193    * Neutron.Networks :: Checking Network created in OpenStack are pushed
194
195  * Neutron.Subnets
196
197    * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
198    * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
199    * Create New subnet :: Create new subnet in OpenStack
200    * Check New subnet :: Check new subnet created in OpenDaylight
201    * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
202
203  * Neutron.Ports
204
205    * Check OpenStack ports :: Checking OpenStack Neutron for known ports
206    * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
207    * Create New Port :: Create new port in OpenStack
208    * Check New Port :: Check new subnet created in OpenDaylight
209    * Neutron.Ports :: Checking Port created in OpenStack are pushed
210
211  * Delete Ports
212
213    * Delete previously created subnet in OpenStack
214    * Check subnet deleted in OpenDaylight
215    * Check subnet deleted in OpenStack
216
217  * Delete network
218
219    * Delete previously created network in OpenStack
220    * Check network deleted in OpenDaylight
221    * Check network deleted in OpenStack
222
223  *
224
225
226 Rally bench test suite
227 ======================
228
229 .. _Rally: https://wiki.openstack.org/wiki/Rally
230
231 Rally bench test suite consist in a suite of light performance tests on some of the OpenStack components.
232
233 The goal of this test suite is to test the different modules of OpenStack and get significant figures that could help us to define telco Cloud KPI.
234
235 The OPNFV scenarios are based on the collection of the existing Rally_ scenarios:
236  * authenticate
237  * cinder
238  * nova
239  * requests
240  * glance
241  * keystone
242  * neutron
243  * quotas
244
245
246 This test suite provides performance information on VIM (OpenStack) part.
247
248 No SLA were defined for release 1, we just consider whether the tests are passed or failed.
249
250 In the future SLA shall be defined (e.g. accepting booting time for a given image with a given flavour).
251
252 Through its integration in Continuous Integration, the evolution of the performance of these tests shall also be considered.
253
254 Tempest
255 =======
256
257 .. _Tempest: http://docs.openstack.org/developer/tempest/overview.html
258
259 Tempest_ is the OpenStack Integration Test Suite. We use Rally to run Tempest suite.
260
261 The Tempest.conf configuration file is automatically generated by Rally then the Tempest suite is run, each test duration is measured.
262
263 We considered the smoke test suite for Arno.
264
265 The goal of this test is to  to check the basic OpenStack functionality on a fresh installation.
266
267
268
269 .. _tooling_installation:
270
271 ----------------------
272 Tooling installation
273 ----------------------
274
275 2 external tools are needed for the functional tests on Arno:
276  * Rally
277  * Robot
278
279 Rally is used for benchmarking and running Tempest. Robot is used for running OpenDaylight test suites.
280
281 A script (config_test.py) has been created to simplify as much as possible the installation of the different suites of tests.
282
283 This script config_test.py_ is hosted in OPNFV repository and uses the configuration file config_functest.yaml_::
284
285  usage: config_functest.py [-h] [-d] [-f] path action
286
287  positional arguments:
288   repo_path    path to the repository
289   action       Possible actions are: 'start|check|clean'
290
291  optional arguments:
292   -h, --help   show this help message and exit
293   -d, --debug  Debug mode
294   -f, --force  used to avoid prompting the user for confirmation when cleaning functest environment.
295
296 Actions
297  * start: will prepare the functional testing environment
298  * check: will check the configuration (scenarios available, environment variables properly set, networks,..)
299  * clean: will clean the functional test environement if existing
300
301 This script will:
302  * Install Rally environment
303  * Install Robot environment
304  * Install Tempest
305  * Retrieve test scenarios
306  * Create temporary neutron private network (if needed)
307  * Create Glance images
308
309
310 When integrated in CI, the only prerequisite consists in retrieving the OpenStack credentials (rc file).
311 This file shall be saved on the jumphost. It must be sourced by the user (who shall have sudo rights) executing the tests.
312
313 For the Continuous Integration we store this file under $HOME/functest/opnfv-openrc.sh on the jumphost server so CI can automatically execute the suite of tests
314
315 The procedure to set up functional testing environment can be described as follow:
316
317 Log on the Jumphost server. Be sure you are no root then execute::
318
319     [user@jumphost]$ mkdir <Your_functest_directory>
320     [user@jumphost]$ cd <Your_functest_directory>
321     [user@jumphost]$ git clone https://git.opnfv.org/functest
322     [user@jumphost]$ cd testcases/
323
324 Modify and adapt needed parameters in the config_functest.yaml. Follow the instructions below.
325
326 Retrieve OpenStack source file (configure your `OpenRC`_ file to let Rally access to your OpenStack, you can either export it from Horizon or build it manually (OpenStack credentials are required)::
327
328     [user@jumphost]$ source Your_OpenRC_file
329     [user@jumphost]$ python <functest_repo_directory>/config_functest.py -d <Your_functest_directory> start
330
331 At the end of the git clone, the tree of <functest_repo_directory> will have the following structure::
332
333  |-- docs/
334  |   |-- functest.rst
335  |   |-- images
336  |        |-- Ims_overview.png
337  |-- INFO
338  |-- LICENSE
339  |-- testcases/
340       |-- config_functest.py
341       |-- config_functest.yaml
342       |-- functest_utils.py
343       |-- Controllers/
344       |     |-- ODL/
345       |          |-- CI/
346       |          |    |-- create_venv.sh
347       |          |    |-- custom_tests/
348       |          |    |    |-- neutron
349       |          |    |-- integration/
350       |          |    |    |-- distributions
351       |          |    |    |-- features
352       |          |    |    |-- feature-selector
353       |          |    |    |-- packaging
354       |          |    |    |-- pom.xml
355       |          |    |    |-- test
356       |          |    |    |-- vm
357       |          |    |-- logs
358       |          |    |-- requirements.pip
359       |          |    |-- start_tests.sh
360       |          |    |-- test_list.txt
361       |          |-- ODL.md
362       |-- functest_utils.py
363       |-- VIM/
364       |   |-- OpenStack/
365       |       |-- CI/
366       |       |   |-- libraries/
367       |       |   |    |-- run_rally.py
368       |       |   |-- suites/
369       |       |        |-- opnfv-authenticate.json
370       |       |        |-- opnfv-cinder.json
371       |       |        |-- opnfv-glance.json
372       |       |        |-- opnfv-heat.json
373       |       |        |-- opnfv-keystone.json
374       |       |        |-- opnfv-neutron.json
375       |       |        |-- opnfv-nova.json
376       |       |        |-- opnfv-quotas.json
377       |       |        |-- opnfv-requests.json
378       |       |        |-- opnfv-smoke-green.json
379       |       |        |-- opnfv-smoke.json
380       |       |        |-- opnfv-tempest.json
381       |       |        |-- opnfv-vm.json
382       |       |-- OpenStack.md
383       |-- vPing/
384           |-- CI/
385               |-- libraries/
386                    |-- vPing.py
387
388
389 NOTE: the Rally environment will be installed under ~/.rally/ the default Tempest configuration (automatically generated by Rally based on OpenStack credentials) can be found under .rally/tempest/for-deployment-<deployment_id>/tempest.conf
390
391
392 Configuration of config_functest.yaml
393 =====================================
394
395 Do not change the directories structure:
396
397     * image_name:               name of the image that will be created in Glance
398     * image_url:                URL of the image to be downloaded
399     * image_disk_format:        glance image disk format (raw, qcow2, ...)
400
401     * neutron_private_net_name:     name of an OpenStack private network. If not existing, it will be created
402     * neutron_private_subnet_name:  private subnet network to be created if not existing
403     * neutron_private_subnet_cidr:  range of the private subnet.
404     * neutron_private_subnet_start: start IP
405     * neutron_private_subnet_end:   end IP
406     * neutron_router_name:          name of the router between the private and the public networks
407
408     * ping_timeout: time out of the vPing test case
409     * vm_flavor:    name of the flavor used to create the VMs
410     * vm_name_1:    name of the first VM
411     * vm_name_2:    name of the second VM
412     * ip_1:    IP of the first VM (matching the private subnet cidr)
413     * ip_2:    IP of the second VM
414
415
416 Please note that you need to install this environment only once.
417 As long as the credentials of the System Under Test do not change, there is no reason to modify the testing environment.
418
419 If you need more details on Rally installation, see `Rally installation procedure`_.
420
421 You can check if the configuration of rally is fine by typing 'rally deployment check', you shall see the list of available services as follow::
422
423     # rally deployment check
424     keystone endpoints are valid and following service are available:
425     +-------------+-----------+------------+
426     | Services  | Type        | Status     |
427     +-----------+-------------+------------+
428     | cinder    | volume      | Available  |
429     | cinderv2  | volumev2    | Available  |
430     | glance    | image       | Available  |
431     | keystone  | identity    | Available  |
432     | neutron   | network     | Available  |
433     | nova      | compute     | Available  |
434     | nova_ec2  | compute_ec2 | Available  |
435     | novav3    | computev3   | Available  |
436     +-----------+-------------+------------+
437
438     # rally show images
439     +--------------------------------------+----------------------------------------------+------------+
440     | UUID                                 | Name                                         | Size (B)   |
441     +--------------------------------------+----------------------------------------------+------------+
442     | 0a15951f-6388-4d5d-8531-79e7205eb140 | cirros_2015_04_10_13_13_18                   | 13167616   |
443     | b1504066-045a-4f8f-8919-8c665ef3f400 | Ubuntu 14.04 64b                             | 253297152  |
444     +--------------------------------------+----------------------------------------------+------------+
445
446     # rally show flavors
447     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
448     | ID                                   | Name                | vCPUs | RAM (MB) | Swap (MB) | Disk (GB) |
449     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
450     | 110e6375-a058-4af6-b21e-b765187904d2 | m1.medium           | 2     | 1024     |           | 20        |
451     | 7084d7e7-415a-455d-a55a-2ad286ddf7c9 | m1.large            | 4     | 4096     |           | 80        |
452     | a0345ba7-c667-4fd2-964f-7e98f8cda279 | m1.xlarge           | 4     | 8192     |           | 200       |
453     | accdc28c-5e20-4859-a5cc-61cf9009e56d | m1.small            | 1     | 512      |           | 10        |
454     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
455
456     # rally show networks
457     Networks for user `admin` in tenant `admin`:
458     +--------------------------------------+------------------------------+------+
459     | ID                                   | Label                        | CIDR |
460     +--------------------------------------+------------------------------+------+
461     | 4f43c349-956f-4073-9ef6-75bf4e62a0e7 | functest-net                 | None |
462     | faefaab1-e503-41fc-875b-5e3112be49ed | provider_network             | None |
463     +--------------------------------------+------------------------------+------+
464
465
466 --------------
467 Manual testing
468 --------------
469
470 vPing
471 =====
472
473 You can run the vPing testcase by typing::
474
475     [user@jumphost]$ python <functest_repo_directory>/vPing/vPing.py -d <Your_functest_directory>
476
477
478 OpenDaylight
479 ============
480
481 You can run ODL suite as follow::
482
483     [user@jumphost]$ python <functest_repo_directory>testcases/Controllers/ODL/CI/start_tests.sh
484
485 ODL wiki page describes system preparation and running tests. See `Integration Group CSIT`_.
486
487 .. _`Integration Group CSIT`: https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT
488
489
490 Rally bench suite
491 =================
492
493 You can run the script as follow::
494
495     [user@jumphost]$ python <functest_repo_directory>/testcases/VIM/OpenStack/CI/libraries/run_rally.py <functest_repo_directory> <module_to_be_tested>
496
497 with <module_to_be_tested> set to:
498  * authenticate
499  * cinder
500  * nova
501  * requests
502  * glance
503  * keystone
504  * neutron
505  * quotas
506  * all
507
508 The script will:
509  * run rally with the selected scenario
510  * generate the html result page into <result_folder>/<timestamp>/opnfv-[module name].html
511  * generate the json result page into <result_folder>/<timestamp>/opnfv-[module name].json
512  * generate OK or KO per test based on json result file
513
514 Tempest suite
515 =============
516
517 It is possible to use Rally to perform Tempest tests (ref: `tempest installation guide using Rally`_)
518 You just need to run::
519
520      # rally verify start smoke
521
522 The different modes available are smoke, baremetal, compute, data_processing, identity, image, network, object_storage, orchestration, telemetry, and volume. For Arno, it was decided to focus on smoke tests.
523
524 .. _`tempest installation guide using Rally`: https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
525
526
527 .. _manualtest:
528
529 --------------
530 Test results
531 --------------
532
533 vPing
534 =====
535 vPing result is displayed in the console::
536
537  Functest: run vPing
538  2015-06-02 21:24:55,065 - vPing - INFO - Glance image found 'functest-img'
539  2015-06-02 21:24:55,066 - vPing - INFO - Creating neutron network functest-net...
540  2015-06-02 21:24:57,672 - vPing - INFO - Flavor found 'm1.small'
541  2015-06-02 21:24:58,670 - vPing - INFO - Creating instance 'opnfv-vping-1' with IP 192.168.120.30...
542  2015-06-02 21:25:32,098 - vPing - INFO - Instance 'opnfv-vping-1' is ACTIVE.
543  2015-06-02 21:25:32,540 - vPing - INFO - Creating instance 'opnfv-vping-2' with IP 192.168.120.40...
544  2015-06-02 21:25:38,614 - vPing - INFO - Instance 'opnfv-vping-2' is ACTIVE.
545  2015-06-02 21:25:38,614 - vPing - INFO - Waiting for ping...
546  2015-06-02 21:26:42,385 - vPing - INFO - vPing detected!
547  2015-06-02 21:26:42,385 - vPing - INFO - Cleaning up...
548  2015-06-02 21:26:54,127 - vPing - INFO - Deleting network 'functest-net'...
549  2015-06-02 21:26:55,349 - vPing - INFO - vPing OK
550
551
552 OpenDaylight
553 ============
554 .. _`functest wiki (ODL section)`: https://wiki.opnfv.org/r1_odl_suite
555
556
557 The results of ODL tests can be seen in the console::
558
559  ==============================================================================
560  Basic
561  ==============================================================================
562  Basic.010 Restconf OK :: Test suite to verify Restconf is OK
563  ==============================================================================
564  Get Controller Modules :: Get the controller modules via Restconf     | PASS |
565  ------------------------------------------------------------------------------
566  Basic.010 Restconf OK :: Test suite to verify Restconf is OK          | PASS |
567  1 critical test, 1 passed, 0 failed
568  1 test total, 1 passed, 0 failed
569  ==============================================================================
570  Basic                                                                 | PASS |
571  1 critical test, 1 passed, 0 failed
572  1 test total, 1 passed, 0 failed
573  ==============================================================================
574  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
575  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
576  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
577
578  ..............................................................................
579
580  Neutron.Delete Networks :: Checking Network deleted in OpenStack a... | FAIL |
581  2 critical tests, 1 passed, 1 failed
582  2 tests total, 1 passed, 1 failed
583  ==============================================================================
584  Neutron :: Test suite for Neutron Plugin                              | FAIL |
585  18 critical tests, 15 passed, 3 failed
586  18 tests total, 15 passed, 3 failed
587  ==============================================================================
588  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
589  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
590  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
591
592 3 result files are generated:
593  * output.xml
594  * log.html
595  * report.html
596
597  ODL result page
598
599 .. figure:: ./images/functestODL.png
600    :width: 170mm
601    :align: center
602    :alt: ODL suite result page
603
604
605 Known issues
606 ------------
607
608 Tests are expected to fail now:
609  * Check port deleted in OpenDaylight
610  * Check subnet deleted in OpenDaylight
611  * Check Network deleted in OpenDaylight
612
613 These failures to delete objects in OpenDaylight (when removed via OpenStack Neutron) are due to the following bug: https://bugs.opendaylight.org/show_bug.cgi?id=3052.
614
615 More details on `functest wiki (ODL section)`_
616
617 Rally bench suite
618 =================
619
620 .. _`functest wiki (Rally section)`: https://wiki.opnfv.org/r1_rally_bench
621
622 Results are available in the result folder through a html page and a json file.
623
624 It generates a result page per module and can be described as follow.
625
626 .. figure:: ./images/functestRally2.png
627    :align: center
628    :alt: Example of Rally keystone test results
629
630
631 .. figure:: ./images/functestRally1.png
632    :scale: 50 %
633    :align: center
634    :alt: Details on Glance test from Rally bench suite
635
636
637 Known issues
638 ------------
639 - some tests of Cinder suite may be failed due to time-out (timer could probably be extended in the configuration file)
640 - some test of Nova & Neutron suite may fail due to network issues (previously created network not properly cleaned and/or quota exceeded because of created ressources that have not be properly cleaned) or ODL bugs (see `ODL bug lists`_).
641
642 More details on `functest wiki (Rally section)`_.
643
644 Tempest suite
645 =============
646
647 You can get the results of tempest by typing::
648
649     # rally verify list
650
651 You shall see the results as follow::
652
653     Total results of verification:
654
655     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
656     | UUID                                 | Deployment UUID                      | Set name | Tests | Failures | Created at                 | Status   |
657     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
658     | 0144c50f-ab03-45fb-9c36-242ad6440b46 | d9e1bb21-8e36-4d89-b137-0c852dbb308e | smoke    | 87    | 32       | 2015-05-05 16:36:00.986003 | finished |
659     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
660
661 If you run this test several times, you will see as many lines as test attempts.
662
663 You can get more details on the test by typing::
664
665     # rally verify show --uuid <UUID of the test>
666     # rally verify detailed --uuid <UUID of the test>
667
668 "show" will show you all the restults including the time needed to execute the test.
669 "detailed" will display additional elements (errors)
670
671 Example of test result display::
672
673     +------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
674     | name                                                                                                                                                       | time      | status |
675     +------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
676     | tempest.api.network.test_routers.RoutersTest.test_create_show_list_update_delete_router[id-f64403e2-8483-4b34-8ccd-b09a87bcc68c,smoke]                     | 0.011466  | FAIL   |
677     | tempest.api.network.test_security_groups.SecGroupIPv6Test.test_create_list_update_show_delete_security_group[id-bfd128e5-3c92-44b6-9d66-7fe29d22c802,smoke]| 1.234566  | OK     |
678     | tempest.api.network.test_security_groups.SecGroupIPv6Test.test_create_show_delete_security_group_rule[id-cfb99e0e-7410-4a3d-8a0c-959a63ee77e9,smoke]       | 1.060221  | OK     |
679     | tempest.api.network.test_security_groups.SecGroupIPv6Test.test_list_security_groups[id-e30abd17-fef9-4739-8617-dc26da88e686,smoke]                         | 0.060797  | OK     |
680     | tempest.api.network.test_security_groups.SecGroupTest.test_create_list_update_show_delete_security_group[id-bfd128e5-3c92-44b6-9d66-7fe29d22c802,smoke]    | 0.685149  | OK     |
681     | tempest.api.network.test_security_groups.SecGroupTest.test_create_show_delete_security_group_rule[id-cfb99e0e-7410-4a3d-8a0c-959a63ee77e9,smoke]           | 0.730561  | OK     |
682     | tempest.api.network.test_security_groups.SecGroupTest.test_list_security_groups[id-e30abd17-fef9-4739-8617-dc26da88e686,smoke]                             | 0.116862  | OK     |
683     | tempest.api.object_storage.test_account_quotas.AccountQuotasTest                                                                                           | 0.0       | SKIP   |
684     | ...                                                                                                                                                        |   ...     |  ...   |
685
686
687 Known issues
688 ------------
689
690 .. _`Rally patch`: https://review.openstack.org/#/c/187481/
691 .. _`automatically generated tempest.conf`: https://github.com/openstack/rally/blob/master/rally/verification/tempest/config.py
692 .. _`functest wiki (Tempest section)`: https://wiki.opnfv.org/r1_tempest
693 .. _`ODL bug lists`: https://bugs.opendaylight.org/buglist.cgi?component=General&product=neutron&resolution=---
694
695 Several tests are declared as failed. They can be divided in 3 main categories:
696  * Invalid credentials (10 errors)
697  * Multiple possible networks found, use a Network ID to be more specific.
698  * Network errors
699
700 The "Invalid Credential" error is not an error. Adding "admin_domain_name=default" in the tempest.conf file generated by Rally will lead to successful tests. A `Rally patch`_ has been proposed to Rally community.
701
702 The Multiple possible netwok error occurs several times and may have different origins. It indicates that the test needs a network context to be run properly. A change in the `automatically generated tempest.conf`_ file could allow to precise the network ID.
703
704 The network errors are various and dealing with all the aspects of networking: create/update/delete network/subnet/port/router. Some may be due to (possible) bug in tempest when it tries to delete networks which should not be there for the following tests. Some may be caused by the ODL bugs, several bugs related to tempest are already reported in `ODL bug lists`_.
705
706 The follow-up of these tests can be found on the `functest wiki (Tempest section)`_.
707
708 .. _automatictest:
709
710 ------------------
711 Testing Automation
712 ------------------
713
714 For Arno, the CI job performs the following actions:
715  * clean and prepare functest environment
716  * run vPing
717  * run ODL tests
718  * run Rally Bench
719  * run Tempest
720  * clean functest environment
721
722 Connection of your platform
723 ===========================
724
725 .. _`Octopus procedure`: https://wiki.opnfv.org/octopus/jenkins_slave_connection/
726
727 If you want to add your platform to the community automation, please follow the `Octopus procedure`_.
728
729 Integrating into CI Pipeline
730 ============================
731
732 .. _`pipeline document`: https://wiki.opnfv.org/octopus/pipelines
733
734 Contact Octopus Team (#opnfv-octopus) and see `pipeline document`_ for more details.
735
736 .. _references:
737
738 ----------
739 References
740 ----------
741
742 OPNFV main site: opnfvmain_.
743
744 OPNFV functional test page: opnfvfunctest_.
745
746 IRC support chan: #opnfv-testperf
747
748 .. _opnfvmain: http://www.opnfv.org
749 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
750 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
751 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
752 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
753 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml