4276594e6737f5f7a5715e352554f20db0b9374f
[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      â”œâ”€â”€ Controllers
327      â”‚   â””── ODL
328      â”‚       â”œâ”€â”€ CI
329      â”‚       â”‚   â”œâ”€â”€ create_venv.sh
330      â”‚       â”‚   â”œâ”€â”€ custom_tests
331      â”‚       â”‚   â”‚   â””── neutron
332      â”‚       â”‚   â”œâ”€â”€ integration
333      â”‚       â”‚   â”‚   â”œâ”€â”€ distributions
334      â”‚       â”‚   â”‚   â”œâ”€â”€ features
335      â”‚       â”‚   â”‚   â”œâ”€â”€ feature-selector
336      â”‚       â”‚   â”‚   â”œâ”€â”€ packaging
337      â”‚       â”‚   â”‚   â”œâ”€â”€ pom.xml
338      â”‚       â”‚   â”‚   â”œâ”€â”€ test
339      â”‚       â”‚   â”‚   â””── vm
340      â”‚       â”‚   â”œâ”€â”€ logs
341      â”‚       â”‚   â”œâ”€â”€ requirements.pip
342      â”‚       â”‚   â”œâ”€â”€ start_tests.sh
343      â”‚       â”‚   â””── test_list.txt
344      â”‚       â””── ODL.md
345      â”œâ”€â”€ functest_utils.py
346      â”œâ”€â”€ VIM
347      â”‚   â””── OpenStack
348      â”‚       â”œâ”€â”€ CI
349      â”‚       â”‚   â”œâ”€â”€ libraries
350      â”‚       â”‚   â”‚   â””── run_rally.py
351      â”‚       â”‚   â””── suites
352      â”‚       â”‚       â”œâ”€â”€ opnfv-authenticate.json
353      â”‚       â”‚       â”œâ”€â”€ opnfv-cinder.json
354      â”‚       â”‚       â”œâ”€â”€ opnfv-glance.json
355      â”‚       â”‚       â”œâ”€â”€ opnfv-heat.json
356      â”‚       â”‚       â”œâ”€â”€ opnfv-keystone.json
357      â”‚       â”‚       â”œâ”€â”€ opnfv-neutron.json
358      â”‚       â”‚       â”œâ”€â”€ opnfv-nova.json
359      â”‚       â”‚       â”œâ”€â”€ opnfv-quotas.json
360      â”‚       â”‚       â”œâ”€â”€ opnfv-requests.json
361      â”‚       â”‚       â”œâ”€â”€ opnfv-smoke-green.json
362      â”‚       â”‚       â”œâ”€â”€ opnfv-smoke.json
363      â”‚       â”‚       â”œâ”€â”€ opnfv-tempest.json
364      â”‚       â”‚       â””── opnfv-vm.json
365      â”‚       â””── OpenStack.md
366      â””── vPing
367          â””── CI
368              â””── libraries
369                  â””── vPing.py
370
371
372 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
373
374
375 Configuration of config_functest.yaml
376 =====================================
377
378 Do not change the directories structure:
379
380     * image_name:               name of the image that will be created in Glance
381     * image_url:                URL of the image to be downloaded
382     * image_disk_format:        glance image disk format (raw, qcow2, ...)
383
384     * neutron_private_net_name:     name of an OpenStack private network. If not existing, it will be created
385     * neutron_private_subnet_name:  private subnet network to be created if not existing
386     * neutron_private_subnet_cidr:  range of the private subnet.
387     * neutron_private_subnet_start: start IP
388     * neutron_private_subnet_end:   end IP
389     * neutron_router_name:          name of the router between the private and the public networks
390
391     * ping_timeout: time out of the vPing test case
392     * vm_flavor:    name of the flavor used to create the VMs
393     * vm_name_1:    name of the first VM
394     * vm_name_2:    name of the second VM
395     * ip_1:    IP of the first VM (matching the private subnet cidr)
396     * ip_2:    IP of the second VM
397
398
399 Please note that you need to install this environment only once.
400 As long as the credentials of the System Under Test do not change, there is no reason to modify the testing environment.
401
402 If you need more details on Rally installation, see `Rally installation procedure`_.
403
404 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::
405
406     # rally deployment check
407     keystone endpoints are valid and following service are available:
408     +-------------+-----------+------------+
409     | Services  | Type        | Status     |
410     +-----------+-------------+------------+
411     | cinder    | volume      | Available  |
412     | cinderv2  | volumev2    | Available  |
413     | glance    | image       | Available  |
414     | keystone  | identity    | Available  |
415     | neutron   | network     | Available  |
416     | nova      | compute     | Available  |
417     | nova_ec2  | compute_ec2 | Available  |
418     | novav3    | computev3   | Available  |
419     +-----------+-------------+------------+
420
421     # rally show images
422     +--------------------------------------+----------------------------------------------+------------+
423     | UUID                                 | Name                                         | Size (B)   |
424     +--------------------------------------+----------------------------------------------+------------+
425     | 0a15951f-6388-4d5d-8531-79e7205eb140 | cirros_2015_04_10_13_13_18                   | 13167616   |
426     | b1504066-045a-4f8f-8919-8c665ef3f400 | Ubuntu 14.04 64b                             | 253297152  |
427     +--------------------------------------+----------------------------------------------+------------+
428
429     # rally show flavors
430     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
431     | ID                                   | Name                | vCPUs | RAM (MB) | Swap (MB) | Disk (GB) |
432     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
433     | 110e6375-a058-4af6-b21e-b765187904d2 | m1.medium           | 2     | 1024     |           | 20        |
434     | 7084d7e7-415a-455d-a55a-2ad286ddf7c9 | m1.large            | 4     | 4096     |           | 80        |
435     | a0345ba7-c667-4fd2-964f-7e98f8cda279 | m1.xlarge           | 4     | 8192     |           | 200       |
436     | accdc28c-5e20-4859-a5cc-61cf9009e56d | m1.small            | 1     | 512      |           | 10        |
437     +--------------------------------------+---------------------+-------+----------+-----------+-----------+
438
439     # rally show networks
440     Networks for user `admin` in tenant `admin`:
441     +--------------------------------------+------------------------------+------+
442     | ID                                   | Label                        | CIDR |
443     +--------------------------------------+------------------------------+------+
444     | 4f43c349-956f-4073-9ef6-75bf4e62a0e7 | functest-net                 | None |
445     | faefaab1-e503-41fc-875b-5e3112be49ed | provider_network             | None |
446     +--------------------------------------+------------------------------+------+
447
448
449 --------------
450 Manual testing
451 --------------
452
453 vPing
454 =====
455
456 You can run the vPing testcase by typing::
457
458     [user@jumphost]$ python <functest_repo_directory>/vPing/vPing.py -d <Your_functest_directory>
459
460
461 OpenDaylight
462 ============
463
464 You can run ODL suite as follow::
465
466     [user@jumphost]$ python <functest_repo_directory>testcases/Controllers/ODL/CI/start_tests.sh
467
468 ODL wiki page describes system preparation and running tests. See `Integration Group CSIT`_.
469
470 .. _`Integration Group CSIT`: https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT
471
472
473 Rally bench suite
474 =================
475
476 You can run the script as follow::
477
478     [user@jumphost]$ python <functest_repo_directory>/testcases/VIM/OpenStack/CI/libraries/run_rally.py <functest_repo_directory> <module_to_be_tested>
479
480 with <module_to_be_tested> set to:
481  * authenticate
482  * cinder
483  * nova
484  * requests
485  * glance
486  * keystone
487  * neutron
488  * quotas
489  * all
490
491 The script will:
492  * run rally with the selected scenario
493  * generate the html result page into <result_folder>/<timestamp>/opnfv-[module name].html
494  * generate the json result page into <result_folder>/<timestamp>/opnfv-[module name].json
495  * generate OK or KO per test based on json result file
496
497 Tempest suite
498 =============
499
500 It is possible to use Rally to perform Tempest tests (ref: `tempest installation guide using Rally`_)
501 You just need to run::
502
503      # rally verify start smoke
504
505 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.
506
507 .. _`tempest installation guide using Rally`: https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
508
509
510 .. _manualtest:
511
512 --------------
513 Test results
514 --------------
515
516 vPing
517 =====
518 vPing result is displayed in the console::
519
520  Functest: run vPing
521  2015-06-02 21:24:55,065 - vPing - INFO - Glance image found 'functest-img'
522  2015-06-02 21:24:55,066 - vPing - INFO - Creating neutron network functest-net...
523  2015-06-02 21:24:57,672 - vPing - INFO - Flavor found 'm1.small'
524  2015-06-02 21:24:58,670 - vPing - INFO - Creating instance 'opnfv-vping-1' with IP 192.168.120.30...
525  2015-06-02 21:25:32,098 - vPing - INFO - Instance 'opnfv-vping-1' is ACTIVE.
526  2015-06-02 21:25:32,540 - vPing - INFO - Creating instance 'opnfv-vping-2' with IP 192.168.120.40...
527  2015-06-02 21:25:38,614 - vPing - INFO - Instance 'opnfv-vping-2' is ACTIVE.
528  2015-06-02 21:25:38,614 - vPing - INFO - Waiting for ping...
529  2015-06-02 21:26:42,385 - vPing - INFO - vPing detected!
530  2015-06-02 21:26:42,385 - vPing - INFO - Cleaning up...
531  2015-06-02 21:26:54,127 - vPing - INFO - Deleting network 'functest-net'...
532  2015-06-02 21:26:55,349 - vPing - INFO - vPing OK
533
534
535 OpenDaylight
536 ============
537 .. _`functest wiki (ODL section)`: https://wiki.opnfv.org/r1_odl_suite
538
539
540 The results of ODL tests can be seen in the console:: 
541
542  ==============================================================================
543  Basic
544  ==============================================================================
545  Basic.010 Restconf OK :: Test suite to verify Restconf is OK
546  ==============================================================================
547  Get Controller Modules :: Get the controller modules via Restconf     | PASS |
548  ------------------------------------------------------------------------------
549  Basic.010 Restconf OK :: Test suite to verify Restconf is OK          | PASS |
550  1 critical test, 1 passed, 0 failed
551  1 test total, 1 passed, 0 failed
552  ==============================================================================
553  Basic                                                                 | PASS |
554  1 critical test, 1 passed, 0 failed
555  1 test total, 1 passed, 0 failed
556  ==============================================================================
557  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
558  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
559  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
560
561  ..............................................................................
562
563  Neutron.Delete Networks :: Checking Network deleted in OpenStack a... | FAIL |
564  2 critical tests, 1 passed, 1 failed
565  2 tests total, 1 passed, 1 failed
566  ==============================================================================
567  Neutron :: Test suite for Neutron Plugin                              | FAIL |
568  18 critical tests, 15 passed, 3 failed
569  18 tests total, 15 passed, 3 failed
570  ==============================================================================
571  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
572  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
573  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
574
575 3 result files are generated:
576  * output.xml
577  * log.html
578  * report.html
579
580  ODL result page
581
582 .. figure:: ./images/functestODL.png
583    :width: 170mm
584    :align: center
585    :alt: ODL suite result page
586
587
588 Known issues
589 ------------
590
591 Tests are expected to fail now:
592  * Check port deleted in OpenDaylight
593  * Check subnet deleted in OpenDaylight
594  * Check Network deleted in OpenDaylight
595
596 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.
597
598 More details on `functest wiki (ODL section)`_
599
600 Rally bench suite
601 =================
602
603 .. _`functest wiki (Rally section)`: https://wiki.opnfv.org/r1_rally_bench
604
605 Results are available in the result folder through a html page and a json file.
606
607 It generates a result page per module and can be described as follow.
608
609 .. figure:: ./images/functestRally2.png
610    :align: center
611    :alt: Example of Rally keystone test results
612
613
614 .. figure:: ./images/functestRally1.png
615    :scale: 50 %
616    :align: center
617    :alt: Details on Glance test from Rally bench suite
618
619
620 Known issues
621 ------------
622 - some tests of Cinder suite may be failed due to time-out (timer could probably be extended in the configuration file)
623 - 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`_).
624
625 More details on `functest wiki (Rally section)`_.
626
627 Tempest suite
628 =============
629
630 You can get the results of tempest by typing::
631
632     # rally verify list
633
634 You shall see the results as follow::
635
636     Total results of verification:
637
638     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
639     | UUID                                 | Deployment UUID                      | Set name | Tests | Failures | Created at                 | Status   |
640     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
641     | 0144c50f-ab03-45fb-9c36-242ad6440b46 | d9e1bb21-8e36-4d89-b137-0c852dbb308e | smoke    | 87    | 32       | 2015-05-05 16:36:00.986003 | finished |
642     +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
643
644 If you run this test several times, you will see as many lines as test attempts.
645
646 You can get more details on the test by typing::
647
648     # rally verify show --uuid <UUID of the test>
649     # rally verify detailed --uuid <UUID of the test>
650
651 "show" will show you all the restults including the time needed to execute the test.
652 "detailed" will display additional elements (errors)
653
654 Example of test result display::
655
656     +------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
657     | name                                                                                                                                                       | time      | status |
658     +------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
659     | tempest.api.network.test_routers.RoutersTest.test_create_show_list_update_delete_router[id-f64403e2-8483-4b34-8ccd-b09a87bcc68c,smoke]                     | 0.011466  | FAIL   |
660     | 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     |
661     | tempest.api.network.test_security_groups.SecGroupIPv6Test.test_create_show_delete_security_group_rule[id-cfb99e0e-7410-4a3d-8a0c-959a63ee77e9,smoke]       | 1.060221  | OK     |
662     | tempest.api.network.test_security_groups.SecGroupIPv6Test.test_list_security_groups[id-e30abd17-fef9-4739-8617-dc26da88e686,smoke]                         | 0.060797  | OK     |
663     | 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     |
664     | tempest.api.network.test_security_groups.SecGroupTest.test_create_show_delete_security_group_rule[id-cfb99e0e-7410-4a3d-8a0c-959a63ee77e9,smoke]           | 0.730561  | OK     |
665     | tempest.api.network.test_security_groups.SecGroupTest.test_list_security_groups[id-e30abd17-fef9-4739-8617-dc26da88e686,smoke]                             | 0.116862  | OK     |
666     | tempest.api.object_storage.test_account_quotas.AccountQuotasTest                                                                                           | 0.0       | SKIP   |
667     | ...                                                                                                                                                        |   ...     |  ...   |
668
669
670 Known issues
671 ------------
672
673 .. _`Rally patch`: https://review.openstack.org/#/c/187481/
674 .. _`automatically generated tempest.conf`: https://github.com/openstack/rally/blob/master/rally/verification/tempest/config.py
675 .. _`functest wiki (Tempest section)`: https://wiki.opnfv.org/r1_tempest
676 .. _`ODL bug lists`: https://bugs.opendaylight.org/buglist.cgi?component=General&product=neutron&resolution=---
677
678 Several tests are declared as failed. They can be divided in 3 main categories:
679  * Invalid credentials (10 errors)
680  * Multiple possible networks found, use a Network ID to be more specific.
681  * Network errors
682
683 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.
684
685 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.
686
687 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`_.
688
689 The follow-up of these tests can be found on the `functest wiki (Tempest section)`_.
690
691 .. _automatictest:
692
693 ------------------
694 Testing Automation
695 ------------------
696
697 For Arno, the CI job performs the following actions:
698  * clean and prepare functest environment
699  * run vPing
700  * run ODL tests
701  * run Rally Bench
702  * run Tempest
703  * clean functest environment
704
705 Connection of your platform
706 ===========================
707
708 .. _`Octopus procedure`: https://wiki.opnfv.org/octopus/jenkins_slave_connection/
709
710 If you want to add your platform to the community automation, please follow the `Octopus procedure`_.
711
712 Integrating into CI Pipeline
713 ============================
714
715 .. _`pipeline document`: https://wiki.opnfv.org/octopus/pipelines
716
717 Contact Octopus Team (#opnfv-octopus) and see `pipeline document`_ for more details.
718
719 .. _references:
720
721 ----------
722 References
723 ----------
724
725 OPNFV main site: opnfvmain_.
726
727 OPNFV functional test page: opnfvfunctest_.
728
729 IRC support chan: #opnfv-testperf
730
731 .. _opnfvmain: http://www.opnfv.org
732 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
733 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
734 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
735 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
736 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml