1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 =========================
5 OPNFV FUNCTEST user guide
6 =========================
15 The goal of this document is to describe the OPNFV Functest test cases and to
16 provide a procedure to execute them. In the OPNFV Colorado system release,
17 a Functest CLI utility is introduced for easier execution of test procedures.
19 A overview presentation has been created for the first OPNFV Summit `[4]`_.
21 This document is a continuation of the OPNFV Functest Configuration Guide `[1]`_.
23 **IMPORTANT**: It is assumed here that the Functest Docker container is already
24 properly deployed and that all instructions described in this guide are to be
25 performed from *inside* the deployed Functest Docker container.
27 .. include:: ./introduction.rst
29 The different test cases are described in the remaining sections of this document.
31 VIM (Virtualized Infrastructure Manager)
32 ----------------------------------------
36 In Colorado release a new Tier 'healthcheck' with one testcase 'healthcheck'
37 is introduced. The healthcheck testcase verifies that some basic IP connectivity
38 and essential operations of OpenStack functionality over the command line are
41 In particular, the following verifications are performed:
43 * DHCP agent functionality for IP address allocation
44 * Openstack Authentication management functionality via the Keystone API
45 * OpenStack Image management functionality via the Glance API
46 * OpenStack Block Storage management functionality via the Cinder API
47 * OpenStack Networking management functionality via the Neutron API
48 * Openstack Compute management functionality via the NOVA API
50 Self-obviously, successful completion of the 'healthcheck' testcase is a
51 necessary pre-requisite for the execution of all other test Tiers.
57 Given the script **ping.sh**::
61 ping -c 1 $1 2>&1 >/dev/null
63 if [ "Z$RES" = "Z0" ] ; then
73 The goal of this test is to establish an SSH connection using a floating IP
74 on the Public/External network and verify that 2 instances can talk over a Private
78 +-------------+ +-------------+
80 | | Boot VM1 with IP1 | |
81 | +------------------->| |
83 | | Boot VM2 | Under |
84 | +------------------->| Test |
86 | | Create floating IP | |
87 | +------------------->| |
89 | | Assign floating IP | |
91 | +------------------->| |
94 | | connection to VM2 | |
95 | | through floating IP| |
96 | +------------------->| |
98 | | SCP ping.sh to VM2 | |
99 | +------------------->| |
102 | | ping.sh to VM1 | |
103 | +------------------->| |
107 | | else (timeout): | |
110 +-------------+ +-------------+
112 This test can be considered as an "Hello World" example.
113 It is the first basic use case which **must** work on any deployment.
118 This test case is similar to vPing_ssh but without the use of Floating IPs
119 and the Public/External network to transfer the ping script.
120 Instead, it uses Nova metadata service to pass it to the instance at booting time.
121 As vPing_ssh, it checks that 2 instances can talk to
122 each other on a Private Tenant network::
124 vPing_userdata test case
125 +-------------+ +-------------+
127 | | Boot VM1 with IP1 | |
128 | +------------------->| |
130 | | Boot VM2 with | |
131 | | ping.sh as userdata| |
132 | | with IP1 as $1. | |
133 | +------------------->| |
134 | Tester | | System |
135 | | VM2 exeutes ping.sh| Under |
136 | | (ping IP1) | Test |
137 | +------------------->| |
140 | | console-log VM 2 | |
143 | | else (timeout) | |
146 +-------------+ +-------------+
148 When the second VM boots it will execute the script passed as userdata
149 automatically. The ping will be detected by periodically capturing the output
150 in the console-log of the second VM.
156 Tempest `[2]`_ is the reference OpenStack Integration test suite.
157 It is a set of integration tests to be run against a live OpenStack cluster.
158 Tempest has suites of tests for:
160 * OpenStack API validation
162 * Other specific tests useful in validating an OpenStack deployment
164 Functest uses Rally `[3]`_ to run the Tempest suite.
165 Rally generates automatically the Tempest configuration file **tempest.conf**.
166 Before running the actual test cases,
167 Functest creates the needed resources (user, tenant) and
168 updates the appropriate parameters into the configuration file.
170 When the Tempest suite is executed, each test duration is measured and the full
171 console output is stored to a *log* file for further analysis.
173 The Tempest testcases are distributed accross two
176 * Smoke Tier - Test Case 'tempest_smoke_serial'
177 * Openstack Tier - Test case 'tempest_full_parallel'
179 NOTE: Test case 'tempest_smoke_serial' executes a defined set of tempest smoke
180 tests with a single thread (i.e. serial mode). Test case 'tempest_full_parallel'
181 executes all defined Tempest tests using several concurrent threads
182 (i.e. parallel mode). The number of threads activated corresponds to the number
183 of available logical CPUs.
185 The goal of the Tempest test suite is to check the basic functionalities of the
186 different OpenStack components on an OPNFV fresh installation, using the
187 corresponding REST API interfaces.
190 Rally bench test suites
191 ^^^^^^^^^^^^^^^^^^^^^^^
193 Rally `[3]`_ is a benchmarking tool that answers the question:
195 *How does OpenStack work at scale?*
197 The goal of this test suite is to benchmark all the different OpenStack modules and
198 get significant figures that could help to define Telco Cloud KPIs.
200 The OPNFV Rally scenarios are based on the collection of the actual Rally scenarios:
212 A basic SLA (stop test on errors) has been implemented.
214 The Rally testcases are distributed accross two Tiers:
216 * Smoke Tier - Test Case 'rally_sanity'
217 * Openstack Tier - Test case 'rally_full'
219 NOTE: Test case 'rally_sanity' executes a limited number of Rally smoke test
220 cases. Test case 'rally_full' executes the full defined set of Rally tests.
226 There are currently 2 available controllers:
234 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
235 from the ODL project using the Robot `[11]`_ framework.
236 The suite verifies creation and deletion of networks, subnets and ports with
237 OpenDaylight and Neutron.
239 The list of tests can be described as follows:
241 * Restconf.basic: Get the controller modules via Restconf
244 * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
245 * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
246 * Create Network :: Create new network in OpenStack
247 * Check Network :: Check Network created in OpenDaylight
248 * Neutron.Networks :: Checking Network created in OpenStack are pushed
252 * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
253 * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
254 * Create New subnet :: Create new subnet in OpenStack
255 * Check New subnet :: Check new subnet created in OpenDaylight
256 * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
260 * Check OpenStack ports :: Checking OpenStack Neutron for known ports
261 * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
262 * Create New Port :: Create new port in OpenStack
263 * Check New Port :: Check new subnet created in OpenDaylight
264 * Neutron.Ports :: Checking Port created in OpenStack are pushed
268 * Delete previously created subnet in OpenStack
269 * Check subnet deleted in OpenDaylight
270 * Check subnet deleted in OpenStack
274 * Delete previously created network in OpenStack
275 * Check network deleted in OpenDaylight
276 * Check network deleted in OpenStack
282 TestON Framework is used to test the ONOS SDN controller functions.
283 The test cases deal with L2 and L3 functions.
284 The ONOS test suite can be run on any ONOS compliant scenario.
286 The test cases are described as follows:
288 * onosfunctest: The main executable file contains the initialization of
289 the docker environment and functions called by FUNCvirNetNB and
294 * Create Network: Post Network data and check it in ONOS
295 * Update Network: Update the Network and compare it in ONOS
296 * Delete Network: Delete the Network and check if it's NULL in ONOS or
298 * Create Subnet: Post Subnet data and check it in ONOS
299 * Update Subnet: Update the Subnet and compare it in ONOS
300 * Delete Subnet: Delete the Subnet and check if it's NULL in ONOS or not
301 * Create Port: Post Port data and check it in ONOS
302 * Update Port: Update the Port and compare it in ONOS
303 * Delete Port: Delete the Port and check if it's NULL in ONOS or not
307 * Create Router: Post data for create Router and check it in ONOS
308 * Update Router: Update the Router and compare it in ONOS
309 * Delete Router: Delete the Router data and check it in ONOS
310 * Create RouterInterface: Post Router Interface data to an existing Router
312 * Delete RouterInterface: Delete the RouterInterface and check the Router
313 * Create FloatingIp: Post data for create FloatingIp and check it in ONOS
314 * Update FloatingIp: Update the FloatingIp and compare it in ONOS
315 * Delete FloatingIp: Delete the FloatingIp and check that it is 'NULL' in
317 * Create External Gateway: Post data to create an External Gateway for an
318 existing Router and check it in ONOS
319 * Update External Gateway: Update the External Gateway and compare the change
320 * Delete External Gateway: Delete the External Gateway and check that it is
342 Promise provides a basic set of test cases as part of the deliverable.
344 The available 33 test cases can be grouped into 7 test suites:
346 #. Add a new OpenStack provider into resource pool: Registers
347 OpenStack into a new resource pool and adds more capacity associated
350 #. Allocation without reservation: Creates a new server in OpenStack
351 and adds a new allocation record in Promise shim-layer.
353 #. Allocation using reservation for immediate use: Creates a resource
354 reservation record with no start/end time and immediately creates a new
355 server in OpenStack and add a new allocation record in Promise
358 #. Reservation for future use: Creates a resource reservation record
359 for a future start time, queries, modifies and cancels the newly created
362 #. Capacity planning: Decreases and increases the available capacity
363 from a provider in the future and queries the available collections and
366 #. Reservation with conflict: Tries to create reservations for
367 immediate and future use with conflict.
369 #. Cleanup test allocations: Destroys all allocations in OpenStack.
374 Many telecom network functions are relying on layer-3 infrastructure services,
375 within a VNF between components, or towards existing external networks.
376 In many cases, these external networks are implemented in MPLS/BGP technology in
377 existing service provider wide-area-networks (WAN). This proven technology
378 provides a good mechanism for inter-operation of a NFV Infrastructure (NFVI)
381 The SDNVPN project defined a 'bgpvpn' test suite.
382 This 'bgpvpn' test suite deals with 2 Tempest cases dedicated to the test of
383 the OpenStack 'bgpvpn' API:
386 * test_create_bgpvpn_as_non_admin_fail
401 The IP Multimedia Subsystem or IP Multimedia Core Network Subsystem (IMS) is an
402 architectural framework for delivering IP multimedia services.
404 vIMS has been integrated in Functest to demonstrate the capability to deploy a
405 relatively complex NFV scenario on the OPNFV platform. The deployment of a complete
406 functional VNF allows the test of most of the
407 essential functions needed for a NFV platform.
409 The goal of this test suite consists of:
411 * deploy a VNF orchestrator (Cloudify)
412 * deploy a Clearwater vIMS (IP Multimedia Subsystem) VNF from this
413 orchestrator based on a TOSCA blueprint defined in `[5]`_
414 * run suite of signaling tests on top of this VNF
416 The Clearwater architecture is described as follows:
418 .. figure:: ../images/clearwater-architecture.png
420 :alt: vIMS architecture
423 .. include:: ./runfunctest.rst
429 Note that the results are documented per scenario basis. Although most of the test
430 cases might show the same output, some of them are not supported by
431 certain scenarios. Please select the appropriate scenario and compare the results
432 to that referenced in the documentation.
438 Based on results collected in CI, a test dashboard is dynamically generated.
441 .. include:: ./troubleshooting.rst
447 .. _`[1]`: http://artifacts.opnfv.org/functest/docs/configguide/#
448 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
449 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
450 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
451 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
452 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
453 .. _`[11]`: http://robotframework.org/
455 OPNFV main site: opnfvmain_.
457 OPNFV functional test page: opnfvfunctest_.
459 IRC support chan: #opnfv-testperf
461 .. _opnfvmain: http://www.opnfv.org
462 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
463 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
464 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
465 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
466 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml