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