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