ba20507b16a879fd593411a31ed6ad30e7706a37
[functest.git] / docs / userguide / index.rst
1 =========================
2 OPNFV FUNCTEST user guide
3 =========================
4
5 .. toctree::
6    :numbered:
7    :maxdepth: 2
8
9
10 Introduction
11 ============
12
13 The goal of this documents is to describe the Functest test cases as well as
14 provide a procedure about how to execute (or launch) them.
15
16 A presentation has been created for the first OPNFV Summit `[4]`_.
17
18 It is assumed that Functest container has been properly installed `[1]`_.
19
20
21 Description of the test cases
22 =============================
23
24 Functest is an OPNFV project dedicated to functional testing.
25 In the continuous integration, it is launched after an OPNFV fresh installation.
26 The Functest target is to verify the basic functions of the infrastructure.
27
28 Functest includes different test suites which several test cases within.
29 Test cases are developed in Functest and in feature projects.
30
31 The current list of test suites can be distributed in 3 main domains::
32
33  +----------------+----------------+--------------------------------------------+
34  | Method         | Test suite     | Comments                                   |
35  +================+================+============================================+
36  |                | vPing          | NFV "Hello World"                          |
37  |                +----------------+--------------------------------------------+
38  |    VIM         | vPing_userdata | Ping using userdata and cloud-init         |
39  |                |                | mechanism                                  |
40  |                +----------------+--------------------------------------------+
41  |(Virtualised    | Tempest        | OpenStack reference test suite `[2]`_      |
42  | Infrastructure +----------------+--------------------------------------------+
43  | Manager)       | Rally scenario | OpenStack testing tool testing OpenStack   |
44  |                |                | modules `[3]`_                             |
45  +----------------+----------------+--------------------------------------------+
46  |                | OpenDaylight   | Opendaylight Test suite                    |
47  |                +----------------+--------------------------------------------+
48  | Controllers    | ONOS           | Test suite of ONOS L2 and L3 functions     |
49  |                +----------------+--------------------------------------------+
50  |                | OpenContrail   |                                            |
51  +----------------+----------------+--------------------------------------------+
52  | Features       | vIMS           | Show the capability to deploy a real NFV   |
53  |                |                | test cases.                                |
54  |                |                | The IP Multimedia Subsytem is a typical    |
55  |                |                | Telco test case, referenced by ETSI.       |
56  |                |                | It provides a fully functional VoIP System.|
57  |                +----------------+--------------------------------------------+
58  |                | Promise        | Resource reservation and management project|
59  |                |                | to identify NFV related requirements and   |
60  |                |                | realize resource reservation for future    |
61  |                |                | usage by capacity management of resource   |
62  |                |                | pools regarding compute, network and       |
63  |                |                | storage.                                   |
64  |                +----------------+--------------------------------------------+
65  |                | SDNVPN         |                                            |
66  +----------------+----------------+--------------------------------------------+
67
68
69 Most of the test suites are developed upstream.
70 For example, Tempest `[2]`_ is the OpenStack integration test suite.
71 Functest is in charge of the integration of different functional test suites.
72
73 The Tempest suite has been customized but no new test cases have been created.
74 Some OPNFV feature projects (.e.g. SDNVPN) have created Tempest tests cases and
75 pushed to upstream.
76
77 The tests run from CI are pushed into a database.
78 The goal is to populate the database with results and to show them on a Test
79 Dashboard.
80
81 There is no real notion of Test domain or Test coverage yet.
82 Basic components (VIM, controllers) are tested through their own suites.
83 Feature projects also provide their own test suites.
84
85 vIMS test case was integrated to demonstrate the capability to deploy a
86 relatively complex NFV scenario on top of the OPNFV infrastructure.
87
88 Functest considers OPNFV as a black box.
89 OPNFV, since Brahmaputra, offers lots of possible combinations:
90
91   * 3 controllers (OpenDayligh, ONOS, OpenContrail)
92   * 4 installers (Apex, Compass, Fuel, Joid)
93
94 However most of the tests shall be runnable on any configuration.
95
96 The different scenarios are described in the section hereafter.
97
98 VIM
99 ---
100
101 vPing
102 ^^^^^
103
104 The goal of this test can be described as follows::
105
106  vPing test case
107  +-------------+                   +-------------+
108  |             |                   |             |
109  |             |     Boot VM1      |             |
110  |             +------------------>|             |
111  |             |                   |             |
112  |             |     Get IP VM1    |             |
113  |             +------------------>|             |
114  |   Tester    |                   |   System    |
115  |             |     Boot VM2      |    Under    |
116  |             +------------------>|     Test    |
117  |             |                   |             |
118  |             |   Create (VM2)    |             |
119  |             |   floating IP     |             |
120  |             +------------------>|             |
121  |             |                   |             |
122  |             | SCP vPing script  |             |
123  |             |      to VM2       |             |
124  |             +------------------>|             |
125  |             |                   |             |
126  |             |   SSH to VM2      |             |
127  |             +------------------>|             |
128  |             |                   |             |
129  |             |    Ping VM1       |             |
130  |             |    private IP     |             |
131  |             +------------------>|             |
132  |             |                   |             |
133  |             |    If ping:       |             |
134  |             |      exit OK      |             |
135  |             |    else (timeout) |             |
136  |             |      exit KO      |             |
137  |             |                   |             |
138  +-------------+                   +-------------+
139
140
141 vPing_userdata
142 ^^^^^^^^^^^^^^
143
144 The goal of this test can be described as follow::
145
146  vPing_userdata test case
147  +-------------+                   +-------------+
148  |             |                   |             |
149  |             |     Boot VM1      |             |
150  |             +------------------>|             |
151  |             |                   |             |
152  |             |     Get IP VM1    |             |
153  |             +------------------>|             |
154  |   Tester    |                   |   System    |
155  |             |     Boot VM2      |    Under    |
156  |             +------------------>|     Test    |
157  |             | VM2 pings VM1     |             |
158  |             |   (cloud-init)    |             |
159  |             | Check console log |             |
160  |             |    If ping:       |             |
161  |             |      exit OK      |             |
162  |             |    else (timeout) |             |
163  |             |      exit KO      |             |
164  |             |                   |             |
165  +-------------+                   +-------------+
166
167
168 This example can be considered as an "Hello World" example.
169 It is the first basic example, it must work on any configuration.
170
171 Tempest
172 ^^^^^^^
173
174 Tempest `[2]`_ is the reference OpenStack Integration test suite.
175 It is a set of integration tests to be run against a live OpenStack cluster.
176 Tempest has batteries of tests for:
177
178   * OpenStack API validation
179   * Scenarios
180   * other specific tests useful in validating an OpenStack deployment
181
182 We use Rally `[3]`_ to run Tempest suite.
183 Rally generates automatically tempest.conf configuration file.
184 Before running actual test cases Functest creates needed resources.
185 Needed parameters are updated in the configuration file.
186 When the Tempest suite is run, each test duration is measured.
187 The full console output is stored in the tempest.log file.
188
189 As an addition of Arno, Brahmaputra runs a customized set of Tempest test cases.
190 The list is specificed through --tests-file when running Rally.
191 This option has been introduced in Rally in version 0.1.2.
192
193 The customized test list is available in the Functest repo `[4]`_
194 This list contains more than 200 Tempest test cases.
195 The list can be divied into two main parts:
196
197   1) Set of tempest smoke test cases
198   2) Set of test cases from DefCore list `[8]`_
199
200 The goal of Tempest test suite is to check the basic functionalities of
201 different OpenStack components on an OPNFV fresh installation using
202 corresponding REST API interfaces.
203
204
205 Rally bench test suites
206 ^^^^^^^^^^^^^^^^^^^^^^^
207
208 Rally `[3]`_ is a benchmarking tool that answers the question::
209
210  “How does OpenStack work at scale?”.
211
212 The goal of this test suite is to test the different modules of OpenStack and
213 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
217  * authenticate
218  * cinder
219  * glance
220  * heat
221  * keystone
222  * neutron
223  * nova
224  * quotas
225  * requests
226  * vm
227
228 Basic SLA (stop test on errors) have been implemented.
229
230
231 SDN Controllers
232 ---------------
233
234 Brahmaputra introduces new SDN controllers.
235 There are currently 3 possible controllers:
236
237  * OpenDaylight (ODL)
238  * ONOS
239  * OpenContrail (OCL)
240
241 OpenDaylight
242 ^^^^^^^^^^^^
243
244 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
245 from ODL project.
246 The suite verifies creation and deletion of networks, subnets and ports with
247 OpenDaylight and Neutron.
248
249 The list of tests can be described as follow:
250
251  * Restconf.basic: Get the controller modules via Restconf
252  * Neutron.Networks
253
254    * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
255    * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
256    * Create Network :: Create new network in OpenStack
257    * Check Network :: Check Network created in OpenDaylight
258    * Neutron.Networks :: Checking Network created in OpenStack are pushed
259
260  * Neutron.Subnets
261
262    * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
263    * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
264    * Create New subnet :: Create new subnet in OpenStack
265    * Check New subnet :: Check new subnet created in OpenDaylight
266    * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
267
268  * Neutron.Ports
269
270    * Check OpenStack ports :: Checking OpenStack Neutron for known ports
271    * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
272    * Create New Port :: Create new port in OpenStack
273    * Check New Port :: Check new subnet created in OpenDaylight
274    * Neutron.Ports :: Checking Port created in OpenStack are pushed
275
276  * Delete Ports
277
278    * Delete previously created subnet in OpenStack
279    * Check subnet deleted in OpenDaylight
280    * Check subnet deleted in OpenStack
281
282  * Delete network
283
284    * Delete previously created network in OpenStack
285    * Check network deleted in OpenDaylight
286    * Check network deleted in OpenStack
287
288
289 ONOS
290 ^^^^
291
292 TestON Framework is used to test ONOS function.
293 The test cases deal with L2 and L3 functions.
294 ONOS is configured through OPNFV scenario.
295 The ONOS test suite can be run on any ONOS compliant scenario.
296
297 The test cases may be described as follow:
298
299  * onosfunctest: The mainly executable file contains the initialization of
300    the docker environment and functions called by FUNCvirNetNB and
301    FUNCvirNetNBL3
302
303  * FUNCvirNetNB
304
305    * Create Network: Post Network data and check it in ONOS
306    * Update Network: Update the Network and compare it in ONOS
307    * Delete Network: Delete the Network and check if it's NULL in ONOS or
308      not
309    * Create Subnet: Post Subnet data and check it in ONOS
310    * Update Subnet: Update the Subnet and compare it in ONOS
311    * Delete Subnet: Delete the Subnet and check if it's NULL in ONOS or not
312    * Create Port: Post Port data and check it in ONOS
313    * Update Port: Update the Port and compare it in ONOS
314    * Delete Port: Delete the Port and check if it's NULL in ONOS or not
315
316  * FUNCvirNetNBL3
317
318    * Create Router: Post dataes for create Router and check it in ONOS
319    * Update Router: Update the Router and compare it in ONOS
320    * Delete Router: Delete the Router dataes and check it in ONOS
321    * Create RouterInterface: Post RouterInterface data to an exist Router
322      and check it in ONOS
323    * Delete RouterInterface: Delete the RouterInterface and check the Router
324    * Create FloatingIp: Post dataes for create FloatingIp and check it in
325      ONOS
326    * Update FloatingIp: Update the FloatingIp and compare it in ONOS
327    * Delete FloatingIp: Delete the FloatingIp and check if it's NULL in
328      ONOS  or not
329    * Create External Gateway: Post dataes for create External Gateway to an
330      exit Router and check it
331    * Update External Gateway: Update the External Gateway and compare it
332    * Delete External Gateway: Delete the External Gateway and check if it's
333      NULL in ONOS or not
334
335
336 OpenContrail
337 ^^^^^^^^^^^^
338 TODO OVNO
339
340
341
342 Features
343 --------
344
345 vIMS
346 ^^^^
347 The goal of this test suite consists of:
348
349  * deploying a VNF orchestrator (cloudify)
350  * deploy a Clearwater vIMS (IP Multimedia Subsystem) VNF from this
351    orchestrator based on a TOSCA blueprint defined in `[5]`_
352  * run suite of signaling tests on top of this VNF
353
354 The Clearwater architecture is described as follows:
355
356 .. figure:: ../images/clearwater-architecture.png
357    :align: center
358    :alt: vIMS architecture
359
360 Two types of information are stored in the Test Database:
361
362  * the duration of each step (orchestion deployment, VNF deployment and test)
363  * the test results
364
365 The deployment of a complete functional VNF allows the test of most of the
366 essential functions needed for a NFV system.
367
368 Promise
369 ^^^^^^^
370
371 Promise provides a basic set of test cases as part of Brahmaputra.
372
373 The available 33 test cases can be grouped into 7 test suites:
374
375     #. Add a new OpenStack provider into resource pool: Registers
376        OpenStack into a new resource pool and adds more capacity associated
377        with this pool.
378
379     #. Allocation without reservation: Creates a new server in OpenStack
380        and adds a new allocation record in Promise shim-layer.
381
382     #. Allocation using reservation for immediate use: Creates a resource
383        reservation record with no start/end time and immediately creates a new
384        server in OpenStack and add a new allocation record in Promise
385        shim-layer.
386
387     #. Reservation for future use: Creates a resource reservation record
388        for a future start time, queries, modifies and cancels the newly created
389        reservation.
390
391     #. Capacity planning: Decreases and increases the available capacity
392        from a provider in the future and queries the available collections and
393        utilizations.
394
395     #. Reservation with conflict: Tries to create reservations for
396        immediate and future use with conflict.
397
398     #. Cleanup test allocations: Destroys all allocations in OpenStack.
399
400 The test results are pushed into the LF test DB:
401   * Duration of the Promise test case
402   * Number of tests / failures
403
404 The specific parameters for Promise can be found in config_functest.yaml and
405 include::
406
407    promise:
408      general:
409          tenant_name: Name of the OpenStack tenant/project (e.g. promise)
410          tenant_description: Description of the OpenStack tenant (e.g. promise Functionality Testing)
411          user_name: Name of the user tenant (e.g. promiser)
412          user_pwd: Password of the user tenant (e.g. test)
413          image_name: Name of the software image (e.g. promise-img)
414          flavor_name: Name of the flavor (e.g. promise-flavor with 1 vCPU and 512 MB RAM)
415          flavor_vcpus: 1
416          flavor_ram: 512
417          flavor_disk: 0
418
419
420 Manual testing
421 ==============
422
423 Once the Functest docker container is running and Functest environment ready
424 (through /home/opnfv/repos/functest/docker/prepare_env.sh script), the system is
425 ready to run the tests.
426
427 The script run_tests.sh is located in $repos_dir/functest/docker and it has
428 several options::
429
430     ./run_tests.sh -h
431     Script to trigger the tests automatically.
432
433     usage:
434         bash run_tests.sh [--offline] [-h|--help] [-t <test_name>]
435
436     where:
437         -h|--help         show this help text
438         -r|--report       push results to database (false by default)
439         -n|--no-clean     do not clean up OpenStack resources after test run
440         -t|--test         run specific set of tests
441           <test_name>     one or more of the following: vping,vping_userdata,odl,rally,tempest,vims,onos,promise. Separated by comma.
442
443     examples:
444         run_tests.sh
445         run_tests.sh --test vping,odl
446         run_tests.sh -t tempest,rally --no-clean
447
448 The -r option is used by the Continuous Integration in order to push the test
449 results into a test collection database, see in next section for details.
450 In manual mode, you must not use it, your try will be anyway probably rejected
451 as your POD must be declared in the database to collect the data.
452
453 The -n option is used for preserving all the existing OpenStack resources after
454 execution test cases.
455
456 The -t option can be used to specify the list of test you want to launch, by
457 default Functest will try to launch all its test suites in the following order
458 vPing, odl, Tempest, vIMS, Rally.
459 You may launch only one single test by using -t <the test you want to launch>
460
461 Within Tempest test suite you can define which test cases you want to execute in
462 your environment by editing test_list.txt file before executing run_tests.sh
463 script.
464
465 Please note that Functest includes cleaning mechanism in order to remove
466 everything except what was present after a fresh install.
467 If you create your own VMs, tenants, networks etc. and then launch Functest,
468 they all will be deleted after executing the tests. Use --no-clean option with
469 run_test.sh in order to preserve all the existing resources.
470 However, be aware that Tempest and Rally create of lot of resources (users,
471 tenants, networks, volumes etc.) that are not always properly cleaned, so this
472 cleaning function has been set to keep the system as clean as possible after a
473 full Functest run.
474
475 You may also add you own test by adding a section into the function run_test()
476
477
478 Automated testing
479 =================
480
481 As mentioned in `[1]`, the prepare-env.sh and run_test.sh can be executed within
482 the container from jenkins.
483 2 jobs have been created, one to run all the test and one that allows testing
484 test suite by test suite.
485 You thus just have to launch the acurate jenkins job on the target lab, all the
486 tests shall be automatically run.
487
488 When the tests are automatically started from CI, a basic algorithm has been
489 created in order to detect whether the test is runnable or not on the given
490 scenario.
491 In fact, one of the most challenging task in Brahmaputra consists in dealing
492 with lots of scenario and installers.
493 Functest test suites cannot be systematically run (e.g. run the ODL suite on an
494 ONOS scenario).
495
496 CI provides several information:
497
498  * The installer (apex|compass|fuel|joid)
499  * The scenario [controller]-[feature]-[mode] with
500
501    * controller = (odl|onos|ocl|nosdn)
502    * feature = (ovs(dpdk)|kvm)
503    * mode = (ha|noha)
504
505 Constraints per test case are defined in the Functest configuration file
506 /home/opnfv/functest/config/config_functest.yaml::
507
508  test-dependencies:
509     functest:
510         vims:
511             scenario: '(ocl)|(odl)|(nosdn)'
512         vping:
513         vping_userdata:
514             scenario: '(ocl)|(odl)|(nosdn)'
515         tempest:
516         rally:
517         odl:
518             scenario: 'odl'
519         onos:
520             scenario: 'onos'
521         ....
522
523 At the end of the Functest environment creation (prepare_env.sh see `[1]`_), a
524 file (/home/opnfv/functest/conf/testcase-list.txt) is created with the list of
525 all the runnable tests.
526 We consider the static constraints as regex and compare them with the scenario.
527 For instance, odl can be run only on scenario including odl in its name.
528
529 The order of execution is also described in the Functest configuration file::
530
531  test_exec_priority:
532
533     1: vping
534     2: vping_userdata
535     3: tempest
536     4: odl
537     5: onos
538     6: ovno
539     #7: doctor
540     8: promise
541     9: odl-vpnservice
542     10: bgpvpn
543     #11: openstack-neutron-bgpvpn-api-extension-tests
544     12: vims
545     13: rally
546
547 The tests are executed as follow:
548
549  * Basic scenario (vPing, vPing_userdata, Tempest)
550  * Controller suites: ODL or ONOS or OpenContrail
551  * Feature projects
552  * vIMS
553  * Rally (benchmark scenario)
554
555 At the end of an automated execution, everything is cleaned.
556 We keep only the users/networks that have been statically declared in '[9]'_
557
558
559 Test results
560 ============
561
562 VIM
563 ---
564
565 vPing
566 ^^^^^
567
568 vPing results are displayed in the console::
569
570   FUNCTEST.info: Running vPing test...
571   2016-01-23 03:18:20,153 - vPing- INFO - Creating neutron network vping-net...
572   2016-01-23 03:18:35,476 - vPing- INFO - Flavor found 'm1.small'
573   2016-01-23 03:18:36,350 - vPing- INFO - vPing Start Time:'2016-01-23 03:18:36'
574   2016-01-23 03:18:38,571 - vPing- INFO - Creating instance 'opnfv-vping-1' with IP 192.168.130.30...
575   2016-01-23 03:18:53,716 - vPing- INFO - Instance 'opnfv-vping-1' is ACTIVE.
576   2016-01-23 03:18:55,239 - vPing- INFO - Creating instance 'opnfv-vping-2' with IP 192.168.130.40...
577   2016-01-23 03:19:15,593 - vPing- INFO - Instance 'opnfv-vping-2' is ACTIVE.
578   2016-01-23 03:19:15,593 - vPing- INFO - Creating floating IP for the second VM...
579   2016-01-23 03:19:18,017 - vPing- INFO - Floating IP created: '10.2.65.6'
580   2016-01-23 03:19:18,017 - vPing- INFO - Associating floating ip: '10.2.65.6' to VM2
581   2016-01-23 03:19:37,839 - vPing- INFO - SCP ping script to VM2...
582   2016-01-23 03:19:37,839 - vPing- INFO - Waiting for ping...
583   2016-01-23 03:19:40,130 - vPing- INFO - vPing detected!
584   2016-01-23 03:19:40,130 - vPing- INFO - vPing duration:'63.8'
585   2016-01-23 03:19:40,130 - vPing- INFO - Cleaning up...
586   2016-01-23 03:20:06,574 - vPing- INFO - Deleting network 'vping-net'...
587   2016-01-23 03:20:13,587 - vPing- INFO - vPing OK
588
589
590
591
592 vPing_userdata
593 ^^^^^^^^^^^^^^
594
595 vPing_userdata results are displayed in the console::
596
597     2016-01-06 16:06:20,550 - vPing- INFO - Creating neutron network vping-net...
598     2016-01-06 16:06:23,867 - vPing- INFO - Flavor found 'm1.small'
599     2016-01-06 16:06:24,457 - vPing- INFO - vPing Start Time:'2016-01-06 16:06:24'
600     2016-01-06 16:06:24,626 - vPing- INFO - Creating instance 'opnfv-vping-1' with IP 192.168.130.30...
601     2016-01-06 16:06:39,351 - vPing- INFO - Instance 'opnfv-vping-1' is ACTIVE.
602     2016-01-06 16:06:39,650 - vPing- INFO - Creating instance 'opnfv-vping-2' with IP 192.168.130.40...
603     2016-01-06 16:06:53,330 - vPing- INFO - Instance 'opnfv-vping-2' is ACTIVE.
604     2016-01-06 16:06:53,330 - vPing- INFO - Waiting for ping...
605     2016-01-06 16:06:58,669 - vPing- INFO - vPing detected!
606     2016-01-06 16:06:58,669 - vPing- INFO - vPing duration:'34.2'
607     2016-01-06 16:06:58,670 - vPing- INFO - Cleaning up...
608     2016-01-06 16:07:12,661 - vPing- INFO - Deleting network 'vping-net'...
609     2016-01-06 16:07:14,748 - vPing- INFO - vPing OK
610
611 A json file is produced and pushed into the test result database.
612
613
614 Tempest
615 ^^^^^^^
616
617 The Tempest results are displayed in the console::
618
619   FUNCTEST.info: Running Tempest tests...
620   2016-01-28 07:56:55,380 - run_tempest - INFO - Creating tenant and user for Tempest suite
621   2016-01-28 07:56:56.127 23795 INFO rally.verification.tempest.tempest [-] Starting: Creating configuration file for Tempest.
622   2016-01-28 07:56:59.512 23795 INFO rally.verification.tempest.tempest [-] Completed: Creating configuration file for Tempest.
623   16-01-28 07:57:00,597 - run_tempest - INFO - Starting Tempest test suite: '--tests-file /home/opnfv/repos/functest/testcases/VIM/OpenStack/CI/custom_tests/test_list.txt'.
624   Total results of verification:
625   .
626   +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
627   | UUID                                 | Deployment UUID                      | Set name | Tests | Failures | Created at                 | Status   |
628   +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
629   | e0bf7770-2c0f-4c63-913c-cd51a6edd96d | 16582e1e-7b01-4d5d-9c13-a26db8567b7b |          | 144   | 30       | 2016-01-28 07:57:01.044856 | finished |
630   +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
631   .
632   Tests:
633   .
634   +------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------+
635   | name                                                                                                                                     | time      | status  |
636   +------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------+
637   | tempest.api.compute.flavors.test_flavors.FlavorsV2TestJSON.test_get_flavor                                                               | 0.29804   | success |
638   | tempest.api.compute.flavors.test_flavors.FlavorsV2TestJSON.test_list_flavors                                                             | 0.06289   | success |
639   | tempest.api.compute.images.test_images.ImagesTestJSON.test_delete_saving_image                                                           | 9.21756   | success |
640   | tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_delete_image                                        | 8.65376   | success |
641   | tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_image_specify_multibyte_character_image_name        | 9.10993   | success |
642   | tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_changes_since                     | 0.19585   | success |
643   ...........................................
644   2016-01-28 08:19:32,132 - run_tempest - INFO - Results: {'timestart': '2016-01-2807:57:01.044856', 'duration': 1350, 'tests': 144, 'failures': 30}
645   2016-01-28 08:19:32,133 - run_tempest - INFO - Pushing results to DB: 'http://testresults.opnfv.org/testapi/results'.
646   2016-01-28 08:19:32,278 - run_tempest - INFO - Deleting tenant and user for Tempest suite)
647
648 In order to check all the available test case related debug information, please
649 inspect tempest.log file stored into related Rally deployment folder.
650
651 The Tempest results are pushed to the Test Database.
652
653 Rally
654 ^^^^^
655
656 The Rally results are displayed in the console, each module is run one after the
657 other. Tables are displayed::
658
659   +-------------------------------------------------------------------------------------------+
660   |                                   Response Times (sec)                                    |
661   +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
662   | action               | min   | median | 90%ile | 95%ile | max   | avg   | success | count |
663   +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
664   | keystone.create_role | 0.358 | 0.572  | 0.772  | 0.811  | 1.106 | 0.603 | 100.0%  | 20    |
665   | keystone.add_role    | 0.32  | 0.436  | 0.846  | 0.903  | 1.018 | 0.51  | 100.0%  | 20    |
666   | keystone.list_roles  | 0.102 | 0.185  | 0.253  | 0.275  | 0.347 | 0.188 | 100.0%  | 20    |
667   | total                | 0.845 | 1.223  | 1.821  | 1.822  | 1.823 | 1.302 | 100.0%  | 20    |
668   +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
669   Load duration: 7.13633608818
670   Full duration: 36.7863121033
671   ..............
672   +------------------------------------------------------------------------------------------+
673   |                                   Response Times (sec)                                   |
674   +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
675   | action              | min   | median | 90%ile | 95%ile | max   | avg   | success | count |
676   +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
677   | nova.create_keypair | 1.005 | 1.784  | 3.025  | 3.636  | 4.373 | 2.004 | 100.0%  | 20    |
678   | nova.delete_keypair | 0.199 | 0.699  | 1.007  | 1.244  | 3.014 | 0.79  | 100.0%  | 20    |
679   | total               | 1.249 | 2.625  | 4.259  | 4.845  | 5.131 | 2.794 | 100.0%  | 20    |
680   +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
681   Load duration: 14.9231169224
682   Full duration: 71.4614388943
683
684
685 At the end of the module test, a message is displayed to provide a global
686 summary (Test OK or test failed). The raw results are pushed into the Test
687 Database.
688
689
690 Controllers
691 -----------
692
693 OpenDaylight
694 ^^^^^^^^^^^^
695
696 The results of ODL tests can be seen in the console::
697
698  ==============================================================================
699  Basic
700  ==============================================================================
701  Basic.010 Restconf OK :: Test suite to verify Restconf is OK
702  ==============================================================================
703  Get Controller Modules :: Get the controller modules via Restconf     | PASS |
704  ------------------------------------------------------------------------------
705  Basic.010 Restconf OK :: Test suite to verify Restconf is OK          | PASS |
706  1 critical test, 1 passed, 0 failed
707  1 test total, 1 passed, 0 failed
708  ==============================================================================
709  Basic                                                                 | PASS |
710  1 critical test, 1 passed, 0 failed
711  1 test total, 1 passed, 0 failed
712  ==============================================================================
713  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
714  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
715  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
716
717  ..............................................................................
718
719  Neutron.Delete Networks :: Checking Network deleted in OpenStack a... | PASS |
720  2 critical tests, 2 passed, 0 failed
721  2 tests total, 2 passed, 0 failed
722  ==============================================================================
723  Neutron :: Test suite for Neutron Plugin                              | PASS |
724  18 critical tests, 18 passed, 0 failed
725  18 tests total, 18 passed, 0 failed
726  ==============================================================================
727  Output:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
728  Log:     /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
729  Report:  /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
730
731 3 result files are generated:
732  * output.xml
733  * log.html
734  * report.html
735
736  ODL result page
737
738 .. figure:: ../images/functestODL.png
739    :width: 170mm
740    :align: center
741    :alt: ODL suite result page
742
743
744 ONOS
745 ^^^^
746
747 The ONOS test logs can be found in OnosSystemTest/TestON/logs
748 (ONOSCI_PATH to be added),and also can be seen in the console::
749
750  ******************************
751  Result summary for Testcase4
752  ******************************
753
754  2016-01-14 05:25:40,529 - FUNCvirNetNBL3 - INFO - ONOS Router Delete test Start
755
756  [2016-01-14 05:25:40.529644] [FUNCvirNetNBL3] [CASE]  Virtual Network NBI Test - Router
757  2016-01-14 05:25:40,530 - FUNCvirNetNBL3 - INFO - Generate Post Data
758
759  [2016-01-14 05:25:40.530825] [FUNCvirNetNBL3] [STEP]  4.1: Post Network Data via HTTP(Post Router need post network)
760  2016-01-14 05:25:40,531 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/networks/ using POST method.
761  2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
762  2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Post Network Success
763  2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Assertion Passed
764
765  [2016-01-14 05:25:40.539687] [FUNCvirNetNBL3] [STEP]  4.2: Post Router Data via HTTP
766  2016-01-14 05:25:40,540 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/ using POST method.
767  2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
768  2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Post Router Success
769  2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Assertion Passed
770
771  [2016-01-14 05:25:40.543489] [FUNCvirNetNBL3] [STEP]  4.3: Delete Router Data via HTTP
772  2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/e44bd655-e22c-4aeb-b1e9-ea1606875178 using DELETE method.
773  2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
774  2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Delete Router Success
775  2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Assertion Passed
776
777  [2016-01-14 05:25:40.546774] [FUNCvirNetNBL3] [STEP]  4.4: Get Router Data is NULL
778  2016-01-14 05:25:40,547 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/e44bd655-e22c-4aeb-b1e9-ea1606875178 using GET method.
779  2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
780  2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Get Router Success
781  2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Assertion Passed
782
783
784  *****************************
785   Result: Pass
786  *****************************
787
788  .......................................................................................
789
790  ******************************
791   Result summary for Testcase9
792  ******************************
793  .......................................................................................
794
795
796  [2016-01-14 05:26:42.543489] [FUNCvirNetNBL3] [STEP]  9.6: FloatingIp Clean Data via HTTP
797  2016-01-14 05:26:42,543 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/floatingips/e44bd655-e22c-4aeb-b1e9-ea1606875178 using DELETE method.
798  2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
799  2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - ERROR - Delete Floatingip failed
800
801  .......................................................................................
802
803  *****************************
804   Result: Failed
805  *****************************
806
807 There is a result summary for each testcase, and a global summary for the whole test.
808 If any problem occurs during the test, a ERROR message will be provided in the test and the the global summary::
809
810  *************************************
811          Test Execution Summary
812  *************************************
813
814   Test Start           : 14 Jan 2016 05:25:37
815   Test End             : 14 Jan 2016 05:25:41
816   Execution Time       : 0:00:03.349087
817   Total tests planned  : 11
818   Total tests RUN      : 11
819   Total Pass           : 8
820   Total Fail           : 3
821   Total No Result      : 0
822   Success Percentage   : 72%
823   Execution Result     : 100%
824
825
826 OpenContrail
827 ^^^^^^^^^^^^
828
829 TODO OVNO
830
831
832 Feature
833 -------
834
835 vIMS
836 ^^^^
837
838 The results in the console are very verbose::
839
840     FUNCTEST.info: Running vIMS test...
841     2016-01-07 12:30:24,107 - vIMS - INFO - Prepare OpenStack plateform (create tenant and user)
842     2016-01-07 12:30:24,484 - vIMS - INFO - Update OpenStack creds informations
843     2016-01-07 12:30:24,484 - vIMS - INFO - Upload some OS images if it doesn't exist
844     2016-01-07 12:30:24,917 - vIMS - INFO - centos_7 image doesn't exist on glance repository.
845                                 Try downloading this image and upload on glance !
846     2016-01-07 12:31:01,268 - vIMS - INFO - ubuntu_14.04 image doesn't exist on glance repository.
847                                 Try downloading this image and upload on glance !
848     2016-01-07 12:31:28,670 - vIMS - INFO - Update security group quota for this tenant
849     2016-01-07 12:31:28,903 - vIMS - INFO - Update cinder quota for this tenant
850     2016-01-07 12:31:29,355 - vIMS - INFO - Collect flavor id for cloudify manager server
851     2016-01-07 12:31:30,453 - vIMS - INFO - Prepare virtualenv for cloudify-cli
852     2016-01-07 12:31:30,453 - vIMS - DEBUG - Executing command : chmod +x /home/opnfv/repos/functest/testcases/vIMS/CI/create_venv.sh
853     2016-01-07 12:31:30,460 - vIMS - DEBUG - Executing command : /home/opnfv/repos/functest/testcases/vIMS/CI/create_venv.sh /home/opnfv/functest/data/vIMS/
854     2016-01-07 12:31:30,469 - vIMS - INFO - Downloading the cloudify manager server blueprint
855     2016-01-07 12:31:46,028 - vIMS - INFO - Cloudify deployment Start Time:'2016-01-07 12:31:46'
856     2016-01-07 12:31:46,029 - vIMS - INFO - Writing the inputs file
857     2016-01-07 12:31:46,032 - vIMS - INFO - Launching the cloudify-manager deployment
858     .........................................
859     2016-01-07 12:36:51 LOG <manager> [rabbitmq_3c04e.create] INFO: preparing fabric environment...
860     2016-01-07 12:36:51 LOG <manager> [rabbitmq_3c04e.create] INFO: environment prepared successfully
861     .........................................
862     2016-01-07 12:42:51,982 - vIMS - INFO - Cloudify-manager server is UP !
863     2016-01-07 12:42:51,983 - vIMS - INFO - Cloudify deployment duration:'666.0'
864     2016-01-07 12:42:51,983 - vIMS - INFO - Collect flavor id for all clearwater vm
865     2016-01-07 12:42:53,330 - vIMS - INFO - vIMS VNF deployment Start Time:'2016-01-07 12:42:53'
866     2016-01-07 12:42:53,330 - vIMS - INFO - Downloading the openstack-blueprint.yaml blueprint
867     2016-01-07 12:43:05,798 - vIMS - INFO - Writing the inputs file
868     2016-01-07 12:43:05,801 - vIMS - INFO - Launching the clearwater deployment
869     2016-01-07 12:43:05,801 - vIMS - DEBUG - Executing command : /bin/bash -c 'source /home/opnfv/functest/data/vIMS/venv_cloudify/bin/activate; cd /home/opnfv/functest/data/vIMS/opnfv-cloudify-clearwater; cfy blueprints upload -b clearwater -p openstack-blueprint.yaml; cfy deployments create -b clearwater -d clearwater-opnfv --inputs inputs.yaml; cfy executions start -w install -d clearwater-opnfv --timeout 1800; '
870     2016-01-07 13:01:50,577 - vIMS - DEBUG - Validating openstack-blueprint.yaml
871     Blueprint validated successfully
872     Uploading blueprint openstack-blueprint.yaml to management server 172.30.10.165
873     Uploaded blueprint, blueprint's id is: clearwater
874     Creating new deployment from blueprint clearwater at management server 172.30.10.165
875     Deployment created, deployment's id is: clearwater-opnfv
876     .........................................
877     2016-01-07 13:01:50,578 - vIMS - INFO - The deployment of clearwater-opnfv is ended
878     2016-01-07 13:01:50,578 - vIMS - INFO - vIMS VNF deployment duration:'1137.2'
879     2016-01-07 13:04:50,591 - vIMS - DEBUG - Trying to get clearwater nameserver IP ...
880     2016-01-07 13:04:55,176 - vIMS - INFO - vIMS functional test Start Time:'2016-01-07 13:04:55'
881     2016-01-07 13:14:20,694 - vIMS - INFO - vIMS functional test duration:'565.5'
882     .........................................
883     Basic Call - Rejected by remote endpoint (TCP) - (6505550603, 6505550969) Passed
884     Basic Call - Rejected by remote endpoint (UDP) - (6505550095, 6505550084) Passed
885     Basic Call - Messages - Pager model (TCP) - (6505550000, 6505550520) Passed
886     Basic Call - Messages - Pager model (UDP) - (6505550742, 6505550077) Passed
887     Basic Call - Pracks (TCP) - (6505550670, 6505550304) Passed
888     Basic Call - Pracks (UDP) - (6505550990, 6505550391) Passed
889     Basic Registration (TCP) - (6505550744) Passed
890     Basic Registration (UDP) - (6505550616) Passed
891     Multiple Identities (TCP) - (6505550957, 6505550949) Passed
892     Multiple Identities (UDP) - (6505550771, 6505550675) Passed
893     .........................................
894     2016-01-07 13:14:20,695 - vIMS - DEBUG - Trying to load test results
895     2016-01-07 13:14:20,702 - vIMS - DEBUG - Push result into DB
896     2016-01-07 13:14:20,702 - vIMS - DEBUG - Pushing results to DB....
897     2016-01-07 13:14:21,396 - vIMS - DEBUG - <Response [200]>
898     2016-01-07 13:14:21,396 - vIMS - INFO - Launching the clearwater-opnfv undeployment
899
900 Please note that vIMS traces are very verbose but can bee summarized in several
901 steps:
902
903  * INFO: environment prepared successfully => environment OK
904  * INFO - Cloudify-manager server is UP ! => orchestrator deployed
905  * INFO The deployment of clearwater-opnfv is ended => VNF deployed
906  * Multiple Identities (UDP) - (6505550771, 6505550675) Passed => tests run
907  * DEBUG - Pushing results to DB.... => tests saved
908
909
910 Promise
911 ^^^^^^^
912
913 TODO Promise
914
915
916 Functest in test Dashboard
917 ==========================
918
919 The OPNFV testing group created a test collection database to collect the test
920 results from CI.
921 Any test project running on any lab integrated in CI can push the results to
922 this database.
923 This databse can be used afterwards to see the evolution of the tests and
924 compare the results versus the installers, the scenario or the labs.
925
926 You can find more information about the dashboard from Testing Dashboard wiki
927 page `[6]`_.
928
929
930 Overall Architecture
931 --------------------
932
933 The Test result management in Brahmaputra can be summarized as follow::
934
935   +-------------+    +-------------+    +-------------+
936   |             |    |             |    |             |
937   |   Test      |    |   Test      |    |   Test      |
938   | Project #1  |    | Project #2  |    | Project #N  |
939   |             |    |             |    |             |
940   +-------------+    +-------------+    +-------------+
941            |               |               |
942            V               V               V
943        +-----------------------------------------+
944        |                                         |
945        |         Test Rest API front end         |
946        |  http://testresults.opnfv.org/testapi   |
947        |                                         |
948        +-----------------------------------------+
949            A                |
950            |                V
951            |     +-------------------------+
952            |     |                         |
953            |     |    Test Results DB      |
954            |     |         Mongo DB        |
955            |     |                         |
956            |     +-------------------------+
957            |
958            |
959      +----------------------+
960      |                      |
961      |    test Dashboard    |
962      |                      |
963      +----------------------+
964
965 The Test dashboard URL is: TODO LF
966 A proto Test dashboard has been realized: http://testresults.opnfv.org/proto/
967
968 Test API description
969 --------------------
970
971 The Test API is used to declare pods, projects, test cases and test results. An
972 additional method dashboard has been added to post-process the raw results. The
973 data model is very basic, 4 objects are created:
974
975   * Pods
976   * Test projects
977   * Test cases
978   * Test results
979
980 Pods::
981
982   {
983     "id": <ID>,
984     "details": <URL description of the POD>,
985     "creation_date": YYYY-MM-DD HH:MM:SS ,
986     "name": <The POD Name>,
987     "mode": <metal or virtual>
988   },
989
990 Test project::
991
992   {
993     "id": <ID>,
994     "name": <Name of the Project>,
995     "creation_date": "YYYY-MM-DD HH:MM:SS",
996     "description": <Short description>
997   },
998
999 Test case::
1000
1001   {
1002     "id": <ID>,
1003     "name":<Name of the test case>,
1004     "creation_date": "YYYY-MM-DD HH:MM:SS",
1005     "description": <short description>,
1006     "url":<URL for longer description>
1007   },
1008
1009 Test results::
1010
1011   {
1012     "_id": <ID,
1013     "project_name": <Reference to project>,
1014     "pod_name": <Reference to POD where the test was executed>,
1015     "version": <Scenario on which the test was executed>,
1016     "installer": <Installer Apex or Compass or Fuel or Joid>,
1017     "description": <Short description>,
1018     "creation_date": "YYYY-MM-DD HH:MM:SS",
1019     "case_name": <Reference to the test case>
1020     "details":{
1021        <- the results to be put here ->
1022     }
1023
1024
1025 For Brahmaputra, we got:
1026
1027  * 16 pods
1028  * 18 projects
1029  * 101 test cases
1030
1031 The projects and the test cases have been frozen in December.
1032 But all were not ready for Brahmaputra.
1033
1034
1035
1036 The API can described as follow:
1037
1038 **Version:**::
1039
1040  +--------+--------------------------+------------------------------------------+
1041  | Method | Path                     | Description                              |
1042  +========+==========================+==========================================+
1043  | GET    | /version                 | Get API version                          |
1044  +--------+--------------------------+------------------------------------------+
1045
1046
1047 **Pods:**::
1048
1049  +--------+--------------------------+------------------------------------------+
1050  | Method | Path                     | Description                              |
1051  +========+==========================+==========================================+
1052  | GET    | /pods                    | Get the list of declared Labs (PODs)     |
1053  +--------+--------------------------+------------------------------------------+
1054  | POST   | /pods                    | Declare a new POD                        |
1055  |        |                          | Content-Type: application/json           |
1056  |        |                          | {                                        |
1057  |        |                          |    "name": "pod_foo",                    |
1058  |        |                          |    "creation_date": "YYYY-MM-DD HH:MM:SS"|
1059  |        |                          | }                                        |
1060  +--------+--------------------------+------------------------------------------+
1061
1062 **Projects:**::
1063
1064  +--------+--------------------------+------------------------------------------+
1065  | Method | Path                     | Description                              |
1066  +========+==========================+==========================================+
1067  | GET    | /test_projects           | Get the list of test projects            |
1068  +--------+--------------------------+------------------------------------------+
1069  | GET    |/test_projects/{project}  | Get details on {project}                 |
1070  |        |                          |                                          |
1071  +--------+--------------------------+------------------------------------------+
1072  | POST   | /test_projects           | Add a new test project                   |
1073  |        |                          | Content-Type: application/json           |
1074  |        |                          | {                                        |
1075  |        |                          |    "name": "project_foo",                |
1076  |        |                          |    "description": "whatever you want"    |
1077  |        |                          | }                                        |
1078  +--------+--------------------------+------------------------------------------+
1079  | PUT    | /test_projects/{project} | Update a test project                    |
1080  |        |                          |                                          |
1081  |        |                          | Content-Type: application/json           |
1082  |        |                          | {                                        |
1083  |        |                          |    <the field(s) you want to modify>     |
1084  |        |                          | }                                        |
1085  +--------+--------------------------+------------------------------------------+
1086  | DELETE | /test_projects/{project} | Delete a test project                    |
1087  +--------+--------------------------+------------------------------------------+
1088
1089
1090 **Test cases:**::
1091
1092  +--------+--------------------------+------------------------------------------+
1093  | Method | Path                     | Description                              |
1094  +========+==========================+==========================================+
1095  | GET    | /test_projects/{project}/| Get the list of test cases of {project}  |
1096  |        | cases                    |                                          |
1097  +--------+--------------------------+------------------------------------------+
1098  | POST   | /test_projects/{project}/| Add a new test case to {project}         |
1099  |        | cases                    | Content-Type: application/json           |
1100  |        |                          | {                                        |
1101  |        |                          |    "name": "case_foo",                   |
1102  |        |                          |    "description": "whatever you want"    |
1103  |        |                          |    "creation_date": "YYYY-MM-DD HH:MM:SS"|
1104  |        |                          |    "url": "whatever you want"            |
1105  |        |                          | }                                        |
1106  +--------+--------------------------+------------------------------------------+
1107  | PUT    | /test_projects/{project}?| Modify a test case of {project}          |
1108  |        | case_name={case}          |                                         |
1109  |        |                          | Content-Type: application/json           |
1110  |        |                          | {                                        |
1111  |        |                          |    <the field(s) you want to modify>     |
1112  |        |                          | }                                        |
1113  +--------+--------------------------+------------------------------------------+
1114  | DELETE | /test_projects/{project}/| Delete a test case                       |
1115  |        | case_name={case}         |                                          |
1116  +----------------+----------------+--------------------------------------------+
1117
1118 **Test Results:**::
1119
1120  +--------+--------------------------+------------------------------------------+
1121  | Method | Path                     | Description                              |
1122  +========+==========================+==========================================+
1123  | GET    |/results/project={project}| Get the test results of {project}        |
1124  +--------+--------------------------+------------------------------------------+
1125  | GET    |/results/case={case}      | Get the test results of {case}           |
1126  +--------+--------------------------+------------------------------------------+
1127  | GET    |/results?pod={pod}        | get the results on pod {pod}             |
1128  +--------+--------------------------+------------------------------------------+
1129  | GET    |/results?installer={inst} | Get the test results of installer {inst} |
1130  +--------+--------------------------+------------------------------------------+
1131  | GET    |/results?version={version}| Get the test results of scenario         |
1132  |        |                          | {version}. Initially the version param   |
1133  |        |                          | was reflecting git version, in Functest  |
1134  |        |                          | it was decided to move to scenario       |
1135  +--------+--------------------------+------------------------------------------+
1136  | GET    |/results?project={project}| Get all the results of the test case     |
1137  |        |&case={case}              | {case} of the project {project} with     |
1138  |        |&version={scenario}       | version {scenario} installed by installer|
1139  |        |&installer={installer}    | {installer} on POD {pod} stored since    |
1140  |        |&pod={pod}                | {days} days                              |
1141  |        |                          | {project_name} and {case_name} are       |
1142  |        |&period={days}            | mandatory, the other parameters are      |
1143  |        |                          | optional.                                |
1144  +--------+--------------------------+------------------------------------------+
1145  | POST   | /results                 | Add a new test results                   |
1146  |        |                          | Content-Type: application/json           |
1147  |        |                          | {                                        |
1148  |        |                          |    "project_name": "project_foo",        |
1149  |        |                          |    "case_name": "case_foo",              |
1150  |        |                          |    "pod_name": "pod_foo",                |
1151  |        |                          |    "installer": "installer_foo",         |
1152  |        |                          |    "version": "scenario_foo",            |
1153  |        |                          |    "details": <your results>             |
1154  |        |                          | }                                        |
1155  +--------+--------------------------+------------------------------------------+
1156
1157
1158 **Dashboard:**::
1159
1160  +--------+--------------------------+------------------------------------------+
1161  | Method | Path                     | Description                              |
1162  +========+==========================+==========================================+
1163  | GET    |/dashboard?               | Get all the dashboard ready results of   |
1164  |        |&project={project}        | {case} of the project {project}          |
1165  |        |&case={case}              | version {scenario} installed by installer|
1166  |        |&version={scenario}       | {installer} on POD {pod} stored since    |
1167  |        |&installer={installer}    | {days} days                              |
1168  |        |&pod={pod}                |                                          |
1169  |        |&period={days}            | {project_name} and {case_name} are       |
1170  |        |                          | mandatory, the other parameters are      |
1171  |        |                          | optional.                                |
1172  +--------+--------------------------+------------------------------------------+
1173
1174
1175 The results with dashboard method are post-processed from raw results.
1176 Please note that dashboard results are not stored. Only raw results are stored.
1177
1178
1179
1180 Test Dashboard
1181 --------------
1182
1183 Based on dashboard post-porcessed results, a Test dashboard is automatically
1184 generated.
1185
1186 TODO LF
1187 or http://testresults.opnfv.org/proto/
1188
1189
1190 Troubleshooting
1191 ===============
1192
1193 VIM
1194 ---
1195
1196 vPing
1197 ^^^^^
1198
1199
1200 vPing_userdata
1201 ^^^^^^^^^^^^^^
1202
1203
1204 Tempest
1205 ^^^^^^^
1206
1207 In the upstream OpenStack CI all the Tempest test cases are supposed to pass.
1208 If some test cases fail in an OPNFV deployment, the reason is very probably one
1209 of the following::
1210
1211  +-----------------------------+------------------------------------------------+
1212  | Error                       | Details                                        |
1213  +=============================+================================================+
1214  | Resources required for test | Such resources could be e.g. an external       |
1215  | case execution are missing  | network and access to the management subnet    |
1216  |                             | (adminURL) from the Functest docker container. |
1217  +-----------------------------+------------------------------------------------+
1218  | OpenStack components or     | Check running services in the controller and   |
1219  | services are missing or not | compute nodes (e.g. with "systemctl" or        |
1220  | configured properly         | "service" commands). Configuration parameters  |
1221  |                             | can be verified from related .conf files       |
1222  |                             | located under /etc/<component> directories.    |
1223  +-----------------------------+------------------------------------------------+
1224  | Some resources required for | The tempest.conf file, automatically generated |
1225  | execution test cases are    | by Rally in Functest, does not contain all the |
1226  | missing                     | needed parameters or some parameters are not   |
1227  |                             | set properly.                                  |
1228  |                             | The tempest.conf file is located in /home/opnfv|
1229  |                             | /.rally/tempest/for-deployment-<UUID> in       |
1230  |                             | Functest container                             |
1231  |                             | Use "rally deployment list" command in order to|
1232  |                             | check UUID of current deployment.              |
1233  +-----------------------------+------------------------------------------------+
1234
1235
1236 When some Tempest test case fails, captured traceback and possibly also related
1237 REST API requests/responses are output to the console.
1238 More detailed debug information can be found from tempest.log file stored into
1239 related Rally deployment folder.
1240
1241
1242 Rally
1243 ^^^^^
1244
1245 Same error causes than for Tempest mentioned above may lead to error in Rally.
1246
1247 Controllers
1248 -----------
1249
1250 ODL
1251 ^^^
1252
1253
1254 ONOS
1255 ^^^^
1256
1257
1258 OpenContrail
1259 ^^^^^^^^^^^^
1260
1261
1262 Feature
1263 -------
1264
1265 vIMS
1266 ^^^^
1267
1268
1269 References
1270 ==========
1271
1272 .. _`[1]`: Functest configuration guide URL
1273 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
1274 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
1275 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
1276 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
1277 .. _`[6]`: https://wiki.opnfv.org/opnfv_test_dashboard
1278 .. _`[7]`: http://testresults.opnfv.org/testapi/test_projects/functest/cases
1279 .. _`[8]`: https://wiki.openstack.org/wiki/Governance/DefCoreCommittee
1280 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
1281 .. _`[10]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
1282
1283 OPNFV main site: opnfvmain_.
1284
1285 OPNFV functional test page: opnfvfunctest_.
1286
1287 IRC support chan: #opnfv-testperf
1288
1289 .. _opnfvmain: http://www.opnfv.org
1290 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
1291 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
1292 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
1293 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
1294 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml
1295