1 =========================
2 OPNFV FUNCTEST user guide
3 =========================
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.
16 A presentation has been created for the first OPNFV Summit `[4]`_.
18 It is assumed that Functest container has been properly installed `[1]`_.
21 Description of the test cases
22 =============================
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.
28 Functest includes different test suites which several test cases within.
29 Test cases are developed in Functest and in feature projects.
31 The current list of test suites can be distributed in 3 main domains::
33 +----------------+----------------+--------------------------------------------+
34 | Method | Test suite | Comments |
35 +================+================+============================================+
36 | | vPing | NFV "Hello World" |
37 | +----------------+--------------------------------------------+
38 | VIM | vPing_userdata | Ping using userdata and cloud-init |
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 | +----------------+--------------------------------------------+
51 +----------------+----------------+--------------------------------------------+
52 | Features | vIMS | Show the capability to deploy a real NFV |
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 |
64 | +----------------+--------------------------------------------+
66 +----------------+----------------+--------------------------------------------+
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.
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
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
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.
85 vIMS test case was integrated to demonstrate the capability to deploy a
86 relatively complex NFV scenario on top of the OPNFV infrastructure.
88 Functest considers OPNFV as a black box.
89 OPNFV, since Brahmaputra, offers lots of possible combinations:
91 * 3 controllers (OpenDayligh, ONOS, OpenContrail)
92 * 4 installers (Apex, Compass, Fuel, Joid)
94 However most of the tests shall be runnable on any configuration.
96 The different scenarios are described in the section hereafter.
104 The goal of this test can be described as follows::
107 +-------------+ +-------------+
110 | +------------------>| |
113 | +------------------>| |
114 | Tester | | System |
115 | | Boot VM2 | Under |
116 | +------------------>| Test |
120 | +------------------>| |
122 | | SCP vPing script | |
124 | +------------------>| |
127 | +------------------>| |
131 | +------------------>| |
135 | | else (timeout) | |
138 +-------------+ +-------------+
144 The goal of this test can be described as follow::
146 vPing_userdata test case
147 +-------------+ +-------------+
150 | +------------------>| |
153 | +------------------>| |
154 | Tester | | System |
155 | | Boot VM2 | Under |
156 | +------------------>| Test |
157 | | VM2 pings VM1 | |
159 | | Check console log | |
162 | | else (timeout) | |
165 +-------------+ +-------------+
168 This example can be considered as an "Hello World" example.
169 It is the first basic example, it must work on any configuration.
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:
178 * OpenStack API validation
180 * other specific tests useful in validating an OpenStack deployment
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.
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.
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:
197 1) Set of tempest smoke test cases
198 2) Set of test cases from DefCore list `[8]`_
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.
205 Rally bench test suites
206 ^^^^^^^^^^^^^^^^^^^^^^^
208 Rally `[3]`_ is a benchmarking tool that answers the question::
210 “How does OpenStack work at scale?”.
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.
215 The OPNFV scenarios are based on the collection of the existing Rally scenarios:
228 Basic SLA (stop test on errors) have been implemented.
234 Brahmaputra introduces new SDN controllers.
235 There are currently 3 possible controllers:
244 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
246 The suite verifies creation and deletion of networks, subnets and ports with
247 OpenDaylight and Neutron.
249 The list of tests can be described as follow:
251 * Restconf.basic: Get the controller modules via Restconf
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
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
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
278 * Delete previously created subnet in OpenStack
279 * Check subnet deleted in OpenDaylight
280 * Check subnet deleted in OpenStack
284 * Delete previously created network in OpenStack
285 * Check network deleted in OpenDaylight
286 * Check network deleted in OpenStack
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.
297 The test cases may be described as follow:
299 * onosfunctest: The mainly executable file contains the initialization of
300 the docker environment and functions called by FUNCvirNetNB and
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
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
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
323 * Delete RouterInterface: Delete the RouterInterface and check the Router
324 * Create FloatingIp: Post dataes for create FloatingIp and check it in
326 * Update FloatingIp: Update the FloatingIp and compare it in ONOS
327 * Delete FloatingIp: Delete the FloatingIp and check if it's NULL in
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
347 The goal of this test suite consists of:
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
354 The Clearwater architecture is described as follows:
356 .. figure:: ../images/clearwater-architecture.png
358 :alt: vIMS architecture
360 Two types of information are stored in the Test Database:
362 * the duration of each step (orchestion deployment, VNF deployment and test)
365 The deployment of a complete functional VNF allows the test of most of the
366 essential functions needed for a NFV system.
377 Once the Functest docker container is running and Functest environment ready
378 (through /home/opnfv/repos/functest/docker/prepare_env.sh script), the system is
379 ready to run the tests.
381 The script run_tests.sh is located in $repos_dir/functest/docker and it has
385 Script to trigger the tests automatically.
388 bash run_tests.sh [--offline] [-h|--help] [-t <test_name>]
391 -h|--help show this help text
392 -r|--report push results to database (false by default)
393 -n|--no-clean do not clean up OpenStack resources after test run
394 -t|--test run specific set of tests
395 <test_name> one or more of the following: vping,vping_userdata,odl,rally,tempest,vims,onos,promise. Separated by comma.
399 run_tests.sh --test vping,odl
400 run_tests.sh -t tempest,rally --no-clean
402 The -r option is used by the Continuous Integration in order to push the test
403 results into a test collection database, see in next section for details.
404 In manual mode, you must not use it, your try will be anyway probably rejected
405 as your POD must be declared in the database to collect the data.
407 The -n option is used for preserving all the existing OpenStack resources after
408 execution test cases.
410 The -t option can be used to specify the list of test you want to launch, by
411 default Functest will try to launch all its test suites in the following order
412 vPing, odl, Tempest, vIMS, Rally.
413 You may launch only one single test by using -t <the test you want to launch>
415 Within Tempest test suite you can define which test cases you want to execute in
416 your environment by editing test_list.txt file before executing run_tests.sh
419 Please note that Functest includes cleaning mechanism in order to remove
420 everything except what was present after a fresh install.
421 If you create your own VMs, tenants, networks etc. and then launch Functest,
422 they all will be deleted after executing the tests. Use --no-clean option with
423 run_test.sh in order to preserve all the existing resources.
424 However, be aware that Tempest and Rally create of lot of resources (users,
425 tenants, networks, volumes etc.) that are not always properly cleaned, so this
426 cleaning function has been set to keep the system as clean as possible after a
429 You may also add you own test by adding a section into the function run_test()
435 As mentioned in `[1]`, the prepare-env.sh and run_test.sh can be executed within
436 the container from jenkins.
437 2 jobs have been created, one to run all the test and one that allows testing
438 test suite by test suite.
439 You thus just have to launch the acurate jenkins job on the target lab, all the
440 tests shall be automatically run.
442 When the tests are automatically started from CI, a basic algorithm has been
443 created in order to detect whether the test is runnable or not on the given
445 In fact, one of the most challenging task in Brahmaputra consists in dealing
446 with lots of scenario and installers.
447 Functest test suites cannot be systematically run (e.g. run the ODL suite on an
450 CI provides several information:
452 * The installer (apex|compass|fuel|joid)
453 * The scenario [controller]-[feature]-[mode] with
455 * controller = (odl|onos|ocl|nosdn)
456 * feature = (ovs(dpdk)|kvm)
459 Constraints per test case are defined in the Functest configuration file
460 /home/opnfv/functest/config/config_functest.yaml::
465 scenario: '(ocl)|(odl)|(nosdn)'
468 scenario: '(ocl)|(odl)|(nosdn)'
477 At the end of the Functest environment creation (prepare_env.sh see `[1]`_), a
478 file (/home/opnfv/functest/conf/testcase-list.txt) is created with the list of
479 all the runnable tests.
480 We consider the static constraints as regex and compare them with the scenario.
481 For instance, odl can be run only on scenario including odl in its name.
483 The order of execution is also described in the Functest configuration file::
497 #11: openstack-neutron-bgpvpn-api-extension-tests
501 The tests are executed as follow:
503 * Basic scenario (vPing, vPing_userdata, Tempest)
504 * Controller suites: ODL or ONOS or OpenContrail
507 * Rally (benchmark scenario)
509 At the end of an automated execution, everything is cleaned.
510 We keep only the users/networks that have been statically declared in '[9]'_
522 vPing results are displayed in the console::
524 FUNCTEST.info: Running vPing test...
525 2016-01-23 03:18:20,153 - vPing- INFO - Creating neutron network vping-net...
526 2016-01-23 03:18:35,476 - vPing- INFO - Flavor found 'm1.small'
527 2016-01-23 03:18:36,350 - vPing- INFO - vPing Start Time:'2016-01-23 03:18:36'
528 2016-01-23 03:18:38,571 - vPing- INFO - Creating instance 'opnfv-vping-1' with IP 192.168.130.30...
529 2016-01-23 03:18:53,716 - vPing- INFO - Instance 'opnfv-vping-1' is ACTIVE.
530 2016-01-23 03:18:55,239 - vPing- INFO - Creating instance 'opnfv-vping-2' with IP 192.168.130.40...
531 2016-01-23 03:19:15,593 - vPing- INFO - Instance 'opnfv-vping-2' is ACTIVE.
532 2016-01-23 03:19:15,593 - vPing- INFO - Creating floating IP for the second VM...
533 2016-01-23 03:19:18,017 - vPing- INFO - Floating IP created: '10.2.65.6'
534 2016-01-23 03:19:18,017 - vPing- INFO - Associating floating ip: '10.2.65.6' to VM2
535 2016-01-23 03:19:37,839 - vPing- INFO - SCP ping script to VM2...
536 2016-01-23 03:19:37,839 - vPing- INFO - Waiting for ping...
537 2016-01-23 03:19:40,130 - vPing- INFO - vPing detected!
538 2016-01-23 03:19:40,130 - vPing- INFO - vPing duration:'63.8'
539 2016-01-23 03:19:40,130 - vPing- INFO - Cleaning up...
540 2016-01-23 03:20:06,574 - vPing- INFO - Deleting network 'vping-net'...
541 2016-01-23 03:20:13,587 - vPing- INFO - vPing OK
549 vPing_userdata results are displayed in the console::
551 2016-01-06 16:06:20,550 - vPing- INFO - Creating neutron network vping-net...
552 2016-01-06 16:06:23,867 - vPing- INFO - Flavor found 'm1.small'
553 2016-01-06 16:06:24,457 - vPing- INFO - vPing Start Time:'2016-01-06 16:06:24'
554 2016-01-06 16:06:24,626 - vPing- INFO - Creating instance 'opnfv-vping-1' with IP 192.168.130.30...
555 2016-01-06 16:06:39,351 - vPing- INFO - Instance 'opnfv-vping-1' is ACTIVE.
556 2016-01-06 16:06:39,650 - vPing- INFO - Creating instance 'opnfv-vping-2' with IP 192.168.130.40...
557 2016-01-06 16:06:53,330 - vPing- INFO - Instance 'opnfv-vping-2' is ACTIVE.
558 2016-01-06 16:06:53,330 - vPing- INFO - Waiting for ping...
559 2016-01-06 16:06:58,669 - vPing- INFO - vPing detected!
560 2016-01-06 16:06:58,669 - vPing- INFO - vPing duration:'34.2'
561 2016-01-06 16:06:58,670 - vPing- INFO - Cleaning up...
562 2016-01-06 16:07:12,661 - vPing- INFO - Deleting network 'vping-net'...
563 2016-01-06 16:07:14,748 - vPing- INFO - vPing OK
565 A json file is produced and pushed into the test result database.
571 The Tempest results are displayed in the console::
573 FUNCTEST.info: Running Tempest tests...
574 2016-01-28 07:56:55,380 - run_tempest - INFO - Creating tenant and user for Tempest suite
575 2016-01-28 07:56:56.127 23795 INFO rally.verification.tempest.tempest [-] Starting: Creating configuration file for Tempest.
576 2016-01-28 07:56:59.512 23795 INFO rally.verification.tempest.tempest [-] Completed: Creating configuration file for Tempest.
577 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'.
578 Total results of verification:
580 +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
581 | UUID | Deployment UUID | Set name | Tests | Failures | Created at | Status |
582 +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
583 | e0bf7770-2c0f-4c63-913c-cd51a6edd96d | 16582e1e-7b01-4d5d-9c13-a26db8567b7b | | 144 | 30 | 2016-01-28 07:57:01.044856 | finished |
584 +--------------------------------------+--------------------------------------+----------+-------+----------+----------------------------+----------+
588 +------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------+
589 | name | time | status |
590 +------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------+
591 | tempest.api.compute.flavors.test_flavors.FlavorsV2TestJSON.test_get_flavor | 0.29804 | success |
592 | tempest.api.compute.flavors.test_flavors.FlavorsV2TestJSON.test_list_flavors | 0.06289 | success |
593 | tempest.api.compute.images.test_images.ImagesTestJSON.test_delete_saving_image | 9.21756 | success |
594 | tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_delete_image | 8.65376 | success |
595 | tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_image_specify_multibyte_character_image_name | 9.10993 | success |
596 | tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_changes_since | 0.19585 | success |
597 ...........................................
598 2016-01-28 08:19:32,132 - run_tempest - INFO - Results: {'timestart': '2016-01-2807:57:01.044856', 'duration': 1350, 'tests': 144, 'failures': 30}
599 2016-01-28 08:19:32,133 - run_tempest - INFO - Pushing results to DB: 'http://testresults.opnfv.org/testapi/results'.
600 2016-01-28 08:19:32,278 - run_tempest - INFO - Deleting tenant and user for Tempest suite)
602 In order to check all the available test case related debug information, please
603 inspect tempest.log file stored into related Rally deployment folder.
605 The Tempest results are pushed to the Test Database.
610 The Rally results are displayed in the console, each module is run one after the
611 other. Tables are displayed::
613 +-------------------------------------------------------------------------------------------+
614 | Response Times (sec) |
615 +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
616 | action | min | median | 90%ile | 95%ile | max | avg | success | count |
617 +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
618 | keystone.create_role | 0.358 | 0.572 | 0.772 | 0.811 | 1.106 | 0.603 | 100.0% | 20 |
619 | keystone.add_role | 0.32 | 0.436 | 0.846 | 0.903 | 1.018 | 0.51 | 100.0% | 20 |
620 | keystone.list_roles | 0.102 | 0.185 | 0.253 | 0.275 | 0.347 | 0.188 | 100.0% | 20 |
621 | total | 0.845 | 1.223 | 1.821 | 1.822 | 1.823 | 1.302 | 100.0% | 20 |
622 +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+
623 Load duration: 7.13633608818
624 Full duration: 36.7863121033
626 +------------------------------------------------------------------------------------------+
627 | Response Times (sec) |
628 +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
629 | action | min | median | 90%ile | 95%ile | max | avg | success | count |
630 +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
631 | nova.create_keypair | 1.005 | 1.784 | 3.025 | 3.636 | 4.373 | 2.004 | 100.0% | 20 |
632 | nova.delete_keypair | 0.199 | 0.699 | 1.007 | 1.244 | 3.014 | 0.79 | 100.0% | 20 |
633 | total | 1.249 | 2.625 | 4.259 | 4.845 | 5.131 | 2.794 | 100.0% | 20 |
634 +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+
635 Load duration: 14.9231169224
636 Full duration: 71.4614388943
639 At the end of the module test, a message is displayed to provide a global
640 summary (Test OK or test failed). The raw results are pushed into the Test
650 The results of ODL tests can be seen in the console::
652 ==============================================================================
654 ==============================================================================
655 Basic.010 Restconf OK :: Test suite to verify Restconf is OK
656 ==============================================================================
657 Get Controller Modules :: Get the controller modules via Restconf | PASS |
658 ------------------------------------------------------------------------------
659 Basic.010 Restconf OK :: Test suite to verify Restconf is OK | PASS |
660 1 critical test, 1 passed, 0 failed
661 1 test total, 1 passed, 0 failed
662 ==============================================================================
664 1 critical test, 1 passed, 0 failed
665 1 test total, 1 passed, 0 failed
666 ==============================================================================
667 Output: /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
668 Log: /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
669 Report: /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
671 ..............................................................................
673 Neutron.Delete Networks :: Checking Network deleted in OpenStack a... | PASS |
674 2 critical tests, 2 passed, 0 failed
675 2 tests total, 2 passed, 0 failed
676 ==============================================================================
677 Neutron :: Test suite for Neutron Plugin | PASS |
678 18 critical tests, 18 passed, 0 failed
679 18 tests total, 18 passed, 0 failed
680 ==============================================================================
681 Output: /home/jenkins-ci/workspace/functest-opnfv-jump-2/output.xml
682 Log: /home/jenkins-ci/workspace/functest-opnfv-jump-2/log.html
683 Report: /home/jenkins-ci/workspace/functest-opnfv-jump-2/report.html
685 3 result files are generated:
692 .. figure:: ../images/functestODL.png
695 :alt: ODL suite result page
701 The ONOS test logs can be found in OnosSystemTest/TestON/logs
702 (ONOSCI_PATH to be added),and also can be seen in the console::
704 ******************************
705 Result summary for Testcase4
706 ******************************
708 2016-01-14 05:25:40,529 - FUNCvirNetNBL3 - INFO - ONOS Router Delete test Start
710 [2016-01-14 05:25:40.529644] [FUNCvirNetNBL3] [CASE] Virtual Network NBI Test - Router
711 2016-01-14 05:25:40,530 - FUNCvirNetNBL3 - INFO - Generate Post Data
713 [2016-01-14 05:25:40.530825] [FUNCvirNetNBL3] [STEP] 4.1: Post Network Data via HTTP(Post Router need post network)
714 2016-01-14 05:25:40,531 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/networks/ using POST method.
715 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
716 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Post Network Success
717 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Assertion Passed
719 [2016-01-14 05:25:40.539687] [FUNCvirNetNBL3] [STEP] 4.2: Post Router Data via HTTP
720 2016-01-14 05:25:40,540 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/ using POST method.
721 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
722 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Post Router Success
723 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Assertion Passed
725 [2016-01-14 05:25:40.543489] [FUNCvirNetNBL3] [STEP] 4.3: Delete Router Data via HTTP
726 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.
727 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
728 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Delete Router Success
729 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Assertion Passed
731 [2016-01-14 05:25:40.546774] [FUNCvirNetNBL3] [STEP] 4.4: Get Router Data is NULL
732 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.
733 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
734 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Get Router Success
735 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Assertion Passed
738 *****************************
740 *****************************
742 .......................................................................................
744 ******************************
745 Result summary for Testcase9
746 ******************************
747 .......................................................................................
750 [2016-01-14 05:26:42.543489] [FUNCvirNetNBL3] [STEP] 9.6: FloatingIp Clean Data via HTTP
751 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.
752 2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal
753 2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - ERROR - Delete Floatingip failed
755 .......................................................................................
757 *****************************
759 *****************************
761 There is a result summary for each testcase, and a global summary for the whole test.
762 If any problem occurs during the test, a ERROR message will be provided in the test and the the global summary::
764 *************************************
765 Test Execution Summary
766 *************************************
768 Test Start : 14 Jan 2016 05:25:37
769 Test End : 14 Jan 2016 05:25:41
770 Execution Time : 0:00:03.349087
771 Total tests planned : 11
776 Success Percentage : 72%
777 Execution Result : 100%
792 The results in the console are very verbose::
794 FUNCTEST.info: Running vIMS test...
795 2016-01-07 12:30:24,107 - vIMS - INFO - Prepare OpenStack plateform (create tenant and user)
796 2016-01-07 12:30:24,484 - vIMS - INFO - Update OpenStack creds informations
797 2016-01-07 12:30:24,484 - vIMS - INFO - Upload some OS images if it doesn't exist
798 2016-01-07 12:30:24,917 - vIMS - INFO - centos_7 image doesn't exist on glance repository.
799 Try downloading this image and upload on glance !
800 2016-01-07 12:31:01,268 - vIMS - INFO - ubuntu_14.04 image doesn't exist on glance repository.
801 Try downloading this image and upload on glance !
802 2016-01-07 12:31:28,670 - vIMS - INFO - Update security group quota for this tenant
803 2016-01-07 12:31:28,903 - vIMS - INFO - Update cinder quota for this tenant
804 2016-01-07 12:31:29,355 - vIMS - INFO - Collect flavor id for cloudify manager server
805 2016-01-07 12:31:30,453 - vIMS - INFO - Prepare virtualenv for cloudify-cli
806 2016-01-07 12:31:30,453 - vIMS - DEBUG - Executing command : chmod +x /home/opnfv/repos/functest/testcases/vIMS/CI/create_venv.sh
807 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/
808 2016-01-07 12:31:30,469 - vIMS - INFO - Downloading the cloudify manager server blueprint
809 2016-01-07 12:31:46,028 - vIMS - INFO - Cloudify deployment Start Time:'2016-01-07 12:31:46'
810 2016-01-07 12:31:46,029 - vIMS - INFO - Writing the inputs file
811 2016-01-07 12:31:46,032 - vIMS - INFO - Launching the cloudify-manager deployment
812 .........................................
813 2016-01-07 12:36:51 LOG <manager> [rabbitmq_3c04e.create] INFO: preparing fabric environment...
814 2016-01-07 12:36:51 LOG <manager> [rabbitmq_3c04e.create] INFO: environment prepared successfully
815 .........................................
816 2016-01-07 12:42:51,982 - vIMS - INFO - Cloudify-manager server is UP !
817 2016-01-07 12:42:51,983 - vIMS - INFO - Cloudify deployment duration:'666.0'
818 2016-01-07 12:42:51,983 - vIMS - INFO - Collect flavor id for all clearwater vm
819 2016-01-07 12:42:53,330 - vIMS - INFO - vIMS VNF deployment Start Time:'2016-01-07 12:42:53'
820 2016-01-07 12:42:53,330 - vIMS - INFO - Downloading the openstack-blueprint.yaml blueprint
821 2016-01-07 12:43:05,798 - vIMS - INFO - Writing the inputs file
822 2016-01-07 12:43:05,801 - vIMS - INFO - Launching the clearwater deployment
823 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; '
824 2016-01-07 13:01:50,577 - vIMS - DEBUG - Validating openstack-blueprint.yaml
825 Blueprint validated successfully
826 Uploading blueprint openstack-blueprint.yaml to management server 172.30.10.165
827 Uploaded blueprint, blueprint's id is: clearwater
828 Creating new deployment from blueprint clearwater at management server 172.30.10.165
829 Deployment created, deployment's id is: clearwater-opnfv
830 .........................................
831 2016-01-07 13:01:50,578 - vIMS - INFO - The deployment of clearwater-opnfv is ended
832 2016-01-07 13:01:50,578 - vIMS - INFO - vIMS VNF deployment duration:'1137.2'
833 2016-01-07 13:04:50,591 - vIMS - DEBUG - Trying to get clearwater nameserver IP ...
834 2016-01-07 13:04:55,176 - vIMS - INFO - vIMS functional test Start Time:'2016-01-07 13:04:55'
835 2016-01-07 13:14:20,694 - vIMS - INFO - vIMS functional test duration:'565.5'
836 .........................................
837 Basic Call - Rejected by remote endpoint (TCP) - (6505550603, 6505550969) Passed
838 Basic Call - Rejected by remote endpoint (UDP) - (6505550095, 6505550084) Passed
839 Basic Call - Messages - Pager model (TCP) - (6505550000, 6505550520) Passed
840 Basic Call - Messages - Pager model (UDP) - (6505550742, 6505550077) Passed
841 Basic Call - Pracks (TCP) - (6505550670, 6505550304) Passed
842 Basic Call - Pracks (UDP) - (6505550990, 6505550391) Passed
843 Basic Registration (TCP) - (6505550744) Passed
844 Basic Registration (UDP) - (6505550616) Passed
845 Multiple Identities (TCP) - (6505550957, 6505550949) Passed
846 Multiple Identities (UDP) - (6505550771, 6505550675) Passed
847 .........................................
848 2016-01-07 13:14:20,695 - vIMS - DEBUG - Trying to load test results
849 2016-01-07 13:14:20,702 - vIMS - DEBUG - Push result into DB
850 2016-01-07 13:14:20,702 - vIMS - DEBUG - Pushing results to DB....
851 2016-01-07 13:14:21,396 - vIMS - DEBUG - <Response [200]>
852 2016-01-07 13:14:21,396 - vIMS - INFO - Launching the clearwater-opnfv undeployment
854 Please note that vIMS traces are very verbose but can bee summarized in several
857 * INFO: environment prepared successfully => environment OK
858 * INFO - Cloudify-manager server is UP ! => orchestrator deployed
859 * INFO The deployment of clearwater-opnfv is ended => VNF deployed
860 * Multiple Identities (UDP) - (6505550771, 6505550675) Passed => tests run
861 * DEBUG - Pushing results to DB.... => tests saved
870 Functest in test Dashboard
871 ==========================
873 The OPNFV testing group created a test collection database to collect the test
875 Any test project running on any lab integrated in CI can push the results to
877 This databse can be used afterwards to see the evolution of the tests and
878 compare the results versus the installers, the scenario or the labs.
880 You can find more information about the dashboard from Testing Dashboard wiki
887 The Test result management in Brahmaputra can be summarized as follow::
889 +-------------+ +-------------+ +-------------+
891 | Test | | Test | | Test |
892 | Project #1 | | Project #2 | | Project #N |
894 +-------------+ +-------------+ +-------------+
897 +-----------------------------------------+
899 | Test Rest API front end |
900 | http://testresults.opnfv.org/testapi |
902 +-----------------------------------------+
905 | +-------------------------+
907 | | Test Results DB |
910 | +-------------------------+
913 +----------------------+
917 +----------------------+
919 The Test dashboard URL is: TODO LF
920 A proto Test dashboard has been realized: http://testresults.opnfv.org/proto/
925 The Test API is used to declare pods, projects, test cases and test results. An
926 additional method dashboard has been added to post-process the raw results. The
927 data model is very basic, 4 objects are created:
938 "details": <URL description of the POD>,
939 "creation_date": YYYY-MM-DD HH:MM:SS ,
940 "name": <The POD Name>,
941 "mode": <metal or virtual>
948 "name": <Name of the Project>,
949 "creation_date": "YYYY-MM-DD HH:MM:SS",
950 "description": <Short description>
957 "name":<Name of the test case>,
958 "creation_date": "YYYY-MM-DD HH:MM:SS",
959 "description": <short description>,
960 "url":<URL for longer description>
967 "project_name": <Reference to project>,
968 "pod_name": <Reference to POD where the test was executed>,
969 "version": <Scenario on which the test was executed>,
970 "installer": <Installer Apex or Compass or Fuel or Joid>,
971 "description": <Short description>,
972 "creation_date": "YYYY-MM-DD HH:MM:SS",
973 "case_name": <Reference to the test case>
975 <- the results to be put here ->
979 For Brahmaputra, we got:
985 The projects and the test cases have been frozen in December.
986 But all were not ready for Brahmaputra.
990 The API can described as follow:
994 +--------+--------------------------+------------------------------------------+
995 | Method | Path | Description |
996 +========+==========================+==========================================+
997 | GET | /version | Get API version |
998 +--------+--------------------------+------------------------------------------+
1003 +--------+--------------------------+------------------------------------------+
1004 | Method | Path | Description |
1005 +========+==========================+==========================================+
1006 | GET | /pods | Get the list of declared Labs (PODs) |
1007 +--------+--------------------------+------------------------------------------+
1008 | POST | /pods | Declare a new POD |
1009 | | | Content-Type: application/json |
1011 | | | "name": "pod_foo", |
1012 | | | "creation_date": "YYYY-MM-DD HH:MM:SS"|
1014 +--------+--------------------------+------------------------------------------+
1018 +--------+--------------------------+------------------------------------------+
1019 | Method | Path | Description |
1020 +========+==========================+==========================================+
1021 | GET | /test_projects | Get the list of test projects |
1022 +--------+--------------------------+------------------------------------------+
1023 | GET |/test_projects/{project} | Get details on {project} |
1025 +--------+--------------------------+------------------------------------------+
1026 | POST | /test_projects | Add a new test project |
1027 | | | Content-Type: application/json |
1029 | | | "name": "project_foo", |
1030 | | | "description": "whatever you want" |
1032 +--------+--------------------------+------------------------------------------+
1033 | PUT | /test_projects/{project} | Update a test project |
1035 | | | Content-Type: application/json |
1037 | | | <the field(s) you want to modify> |
1039 +--------+--------------------------+------------------------------------------+
1040 | DELETE | /test_projects/{project} | Delete a test project |
1041 +--------+--------------------------+------------------------------------------+
1046 +--------+--------------------------+------------------------------------------+
1047 | Method | Path | Description |
1048 +========+==========================+==========================================+
1049 | GET | /test_projects/{project}/| Get the list of test cases of {project} |
1051 +--------+--------------------------+------------------------------------------+
1052 | POST | /test_projects/{project}/| Add a new test case to {project} |
1053 | | cases | Content-Type: application/json |
1055 | | | "name": "case_foo", |
1056 | | | "description": "whatever you want" |
1057 | | | "creation_date": "YYYY-MM-DD HH:MM:SS"|
1058 | | | "url": "whatever you want" |
1060 +--------+--------------------------+------------------------------------------+
1061 | PUT | /test_projects/{project}?| Modify a test case of {project} |
1062 | | case_name={case} | |
1063 | | | Content-Type: application/json |
1065 | | | <the field(s) you want to modify> |
1067 +--------+--------------------------+------------------------------------------+
1068 | DELETE | /test_projects/{project}/| Delete a test case |
1069 | | case_name={case} | |
1070 +----------------+----------------+--------------------------------------------+
1074 +--------+--------------------------+------------------------------------------+
1075 | Method | Path | Description |
1076 +========+==========================+==========================================+
1077 | GET |/results/project={project}| Get the test results of {project} |
1078 +--------+--------------------------+------------------------------------------+
1079 | GET |/results/case={case} | Get the test results of {case} |
1080 +--------+--------------------------+------------------------------------------+
1081 | GET |/results?pod={pod} | get the results on pod {pod} |
1082 +--------+--------------------------+------------------------------------------+
1083 | GET |/results?installer={inst} | Get the test results of installer {inst} |
1084 +--------+--------------------------+------------------------------------------+
1085 | GET |/results?version={version}| Get the test results of scenario |
1086 | | | {version}. Initially the version param |
1087 | | | was reflecting git version, in Functest |
1088 | | | it was decided to move to scenario |
1089 +--------+--------------------------+------------------------------------------+
1090 | GET |/results?project={project}| Get all the results of the test case |
1091 | |&case={case} | {case} of the project {project} with |
1092 | |&version={scenario} | version {scenario} installed by installer|
1093 | |&installer={installer} | {installer} on POD {pod} stored since |
1094 | |&pod={pod} | {days} days |
1095 | | | {project_name} and {case_name} are |
1096 | |&period={days} | mandatory, the other parameters are |
1098 +--------+--------------------------+------------------------------------------+
1099 | POST | /results | Add a new test results |
1100 | | | Content-Type: application/json |
1102 | | | "project_name": "project_foo", |
1103 | | | "case_name": "case_foo", |
1104 | | | "pod_name": "pod_foo", |
1105 | | | "installer": "installer_foo", |
1106 | | | "version": "scenario_foo", |
1107 | | | "details": <your results> |
1109 +--------+--------------------------+------------------------------------------+
1114 +--------+--------------------------+------------------------------------------+
1115 | Method | Path | Description |
1116 +========+==========================+==========================================+
1117 | GET |/dashboard? | Get all the dashboard ready results of |
1118 | |&project={project} | {case} of the project {project} |
1119 | |&case={case} | version {scenario} installed by installer|
1120 | |&version={scenario} | {installer} on POD {pod} stored since |
1121 | |&installer={installer} | {days} days |
1123 | |&period={days} | {project_name} and {case_name} are |
1124 | | | mandatory, the other parameters are |
1126 +--------+--------------------------+------------------------------------------+
1129 The results with dashboard method are post-processed from raw results.
1130 Please note that dashboard results are not stored. Only raw results are stored.
1137 Based on dashboard post-porcessed results, a Test dashboard is automatically
1141 or http://testresults.opnfv.org/proto/
1161 In the upstream OpenStack CI all the Tempest test cases are supposed to pass.
1162 If some test cases fail in an OPNFV deployment, the reason is very probably one
1165 +-----------------------------+------------------------------------------------+
1167 +=============================+================================================+
1168 | Resources required for test | Such resources could be e.g. an external |
1169 | case execution are missing | network and access to the management subnet |
1170 | | (adminURL) from the Functest docker container. |
1171 +-----------------------------+------------------------------------------------+
1172 | OpenStack components or | Check running services in the controller and |
1173 | services are missing or not | compute nodes (e.g. with "systemctl" or |
1174 | configured properly | "service" commands). Configuration parameters |
1175 | | can be verified from related .conf files |
1176 | | located under /etc/<component> directories. |
1177 +-----------------------------+------------------------------------------------+
1178 | Some resources required for | The tempest.conf file, automatically generated |
1179 | execution test cases are | by Rally in Functest, does not contain all the |
1180 | missing | needed parameters or some parameters are not |
1182 | | The tempest.conf file is located in /home/opnfv|
1183 | | /.rally/tempest/for-deployment-<UUID> in |
1184 | | Functest container |
1185 | | Use "rally deployment list" command in order to|
1186 | | check UUID of current deployment. |
1187 +-----------------------------+------------------------------------------------+
1190 When some Tempest test case fails, captured traceback and possibly also related
1191 REST API requests/responses are output to the console.
1192 More detailed debug information can be found from tempest.log file stored into
1193 related Rally deployment folder.
1199 Same error causes than for Tempest mentioned above may lead to error in Rally.
1226 .. _`[1]`: Functest configuration guide URL
1227 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
1228 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
1229 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
1230 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
1231 .. _`[6]`: https://wiki.opnfv.org/opnfv_test_dashboard
1232 .. _`[7]`: http://testresults.opnfv.org/testapi/test_projects/functest/cases
1233 .. _`[8]`: https://wiki.openstack.org/wiki/Governance/DefCoreCommittee
1234 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
1235 .. _`[10]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
1237 OPNFV main site: opnfvmain_.
1239 OPNFV functional test page: opnfvfunctest_.
1241 IRC support chan: #opnfv-testperf
1243 .. _opnfvmain: http://www.opnfv.org
1244 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
1245 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
1246 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
1247 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
1248 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml