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