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 documents is to describe the Functest test cases as well as
16 provide a procedure about how to execute them.
18 A presentation has been created for the first OPNFV Summit `[4]`_.
20 It is assumed that Functest container has been properly installed `[1]`_.
22 .. include:: ./introduction.rst
24 The different scenarios are described in the section hereafter.
26 VIM (Virtualized Infrastructure Manager)
32 Given the script 'ping.sh'::
36 ping -c 1 $1 2>&1 >/dev/null
38 if [ "Z$RES" = "Z0" ] ; then
47 The goal of this test is described as follows::
50 +-------------+ +-------------+
52 | | Boot VM1 with IP1 | |
53 | +------------------->| |
55 | | Boot VM2 | Under |
56 | +------------------->| Test |
58 | | Create floating IP | |
59 | +------------------->| |
61 | | Assign floating IP | |
63 | +------------------->| |
66 | | connection to VM2 | |
67 | | through floating IP| |
68 | +------------------->| |
70 | | SCP ping.sh to VM2 | |
71 | +------------------->| |
74 | | ping.sh to VM1 | |
75 | +------------------->| |
79 | | else (timeout) | |
82 +-------------+ +-------------+
84 This test can be considered as an "Hello World" example.
85 It is the first basic use case which shall work on any deployment.
90 The goal of this test can be described as follows::
92 vPing_userdata test case
93 +-------------+ +-------------+
95 | | Boot VM1 with IP1 | |
96 | +------------------->| |
99 | | ping.sh as userdata| |
100 | | with IP1 as $1. | |
101 | +------------------->| |
102 | Tester | | System |
103 | | VM2 exeutes ping.sh| Under |
104 | | (ping IP1) | Test |
105 | +------------------->| |
108 | | console-log VM 2 | |
111 | | else (timeout) | |
114 +-------------+ +-------------+
116 This scenario is similar to the previous one but it uses cloud-init (nova
117 metadata service) instead of floating IPs and SSH connection. When the second VM
118 boots it will execute the script automatically and the ping will be detected
119 capturing periodically the output in the console-log of the second VM.
125 Tempest `[2]`_ is the reference OpenStack Integration test suite.
126 It is a set of integration tests to be run against a live OpenStack cluster.
127 Tempest has batteries of tests for:
129 * OpenStack API validation
131 * Other specific tests useful in validating an OpenStack deployment
133 Functest uses Rally `[3]`_ to run the Tempest suite.
134 Rally generates automatically the Tempest configuration file (tempest.conf).
135 Before running the actual test cases, Functest creates the needed resources and
136 updates the appropriate parameters to the configuration file.
137 When the Tempest suite is executed, each test duration is measured and the full
138 console output is stored in the tempest.log file for further analysis.
140 As an addition of Arno, Brahmaputra runs a customized set of Tempest test cases.
141 The list is specificed through *--tests-file* when running Rally.
142 This option has been introduced in Rally in version 0.1.2.
144 The customized test list is available in the Functest repo `[4]`_.
145 This list contains more than 200 Tempest test cases and can be divided
146 into two main sections:
148 1) Set of tempest smoke test cases
149 2) Set of test cases from DefCore list `[8]`_
151 The goal of the Tempest test suite is to check the basic functionalities of
152 different OpenStack components on an OPNFV fresh installation using
153 the corresponding REST API interfaces.
156 Rally bench test suites
157 ^^^^^^^^^^^^^^^^^^^^^^^
159 Rally `[3]`_ is a benchmarking tool that answers the question::
161 “How does OpenStack work at scale?”.
163 The goal of this test suite is to benchmark the different OpenStack modules and
164 get significant figures that could help to define Telco Cloud KPIs.
166 The OPNFV scenarios are based on the collection of the existing Rally scenarios:
178 A basic SLA (stop test on errors) have been implemented.
184 Brahmaputra introduces new SDN controllers.
185 There are currently 3 possible controllers:
194 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
195 from the ODL project using the Robot `[11]`_ framework.
196 The suite verifies creation and deletion of networks, subnets and ports with
197 OpenDaylight and Neutron.
199 The list of tests can be described as follows:
201 * Restconf.basic: Get the controller modules via Restconf
204 * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
205 * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
206 * Create Network :: Create new network in OpenStack
207 * Check Network :: Check Network created in OpenDaylight
208 * Neutron.Networks :: Checking Network created in OpenStack are pushed
212 * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
213 * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
214 * Create New subnet :: Create new subnet in OpenStack
215 * Check New subnet :: Check new subnet created in OpenDaylight
216 * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
220 * Check OpenStack ports :: Checking OpenStack Neutron for known ports
221 * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
222 * Create New Port :: Create new port in OpenStack
223 * Check New Port :: Check new subnet created in OpenDaylight
224 * Neutron.Ports :: Checking Port created in OpenStack are pushed
228 * Delete previously created subnet in OpenStack
229 * Check subnet deleted in OpenDaylight
230 * Check subnet deleted in OpenStack
234 * Delete previously created network in OpenStack
235 * Check network deleted in OpenDaylight
236 * Check network deleted in OpenStack
242 TestON Framework is used to test the ONOS SDN controller functions.
243 The test cases deal with L2 and L3 functions.
244 The ONOS test suite can be run on any ONOS compliant scenario.
246 The test cases may be described as follows:
248 * onosfunctest: The main executable file contains the initialization of
249 the docker environment and functions called by FUNCvirNetNB and
254 * Create Network: Post Network data and check it in ONOS
255 * Update Network: Update the Network and compare it in ONOS
256 * Delete Network: Delete the Network and check if it's NULL in ONOS or
258 * Create Subnet: Post Subnet data and check it in ONOS
259 * Update Subnet: Update the Subnet and compare it in ONOS
260 * Delete Subnet: Delete the Subnet and check if it's NULL in ONOS or not
261 * Create Port: Post Port data and check it in ONOS
262 * Update Port: Update the Port and compare it in ONOS
263 * Delete Port: Delete the Port and check if it's NULL in ONOS or not
267 * Create Router: Post dataes for create Router and check it in ONOS
268 * Update Router: Update the Router and compare it in ONOS
269 * Delete Router: Delete the Router dataes and check it in ONOS
270 * Create RouterInterface: Post RouterInterface data to an exist Router
272 * Delete RouterInterface: Delete the RouterInterface and check the Router
273 * Create FloatingIp: Post dataes for create FloatingIp and check it in
275 * Update FloatingIp: Update the FloatingIp and compare it in ONOS
276 * Delete FloatingIp: Delete the FloatingIp and check if it's NULL in
278 * Create External Gateway: Post dataes for create External Gateway to an
279 exit Router and check it
280 * Update External Gateway: Update the External Gateway and compare it
281 * Delete External Gateway: Delete the External Gateway and check if it's
296 The goal of this test suite consists of:
298 * deploy a VNF orchestrator (Cloudify)
299 * deploy a Clearwater vIMS (IP Multimedia Subsystem) VNF from this
300 orchestrator based on a TOSCA blueprint defined in `[5]`_
301 * run suite of signaling tests on top of this VNF
303 The Clearwater architecture is described as follows:
305 .. figure:: ../images/clearwater-architecture.png
307 :alt: vIMS architecture
309 Two types of information are stored in the Test Database:
311 * the duration of each step (orchestion deployment, VNF deployment and test)
314 The deployment of a complete functional VNF allows the test of most of the
315 essential functions needed for a NFV platform.
320 Promise provides a basic set of test cases as part of Brahmaputra.
322 The available 33 test cases can be grouped into 7 test suites:
324 #. Add a new OpenStack provider into resource pool: Registers
325 OpenStack into a new resource pool and adds more capacity associated
328 #. Allocation without reservation: Creates a new server in OpenStack
329 and adds a new allocation record in Promise shim-layer.
331 #. Allocation using reservation for immediate use: Creates a resource
332 reservation record with no start/end time and immediately creates a new
333 server in OpenStack and add a new allocation record in Promise
336 #. Reservation for future use: Creates a resource reservation record
337 for a future start time, queries, modifies and cancels the newly created
340 #. Capacity planning: Decreases and increases the available capacity
341 from a provider in the future and queries the available collections and
344 #. Reservation with conflict: Tries to create reservations for
345 immediate and future use with conflict.
347 #. Cleanup test allocations: Destroys all allocations in OpenStack.
350 The specific parameters for Promise can be found in config_functest.yaml and
355 tenant_name: Name of the OpenStack tenant/project (e.g. promise)
356 tenant_description: Description of the OpenStack tenant (e.g. promise Functionality Testing)
357 user_name: Name of the user tenant (e.g. promiser)
358 user_pwd: Password of the user tenant (e.g. test)
359 image_name: Name of the software image (e.g. promise-img)
360 flavor_name: Name of the flavor (e.g. promise-flavor with 1 vCPU and 512 MB RAM)
365 However, these parameters must not be changed, as they are the values expected
366 by the Promise test suite.
368 .. include:: ./runfunctest.rst
373 For Brahmaputra test results, see the functest results document at:
374 http://artifacts.opnfv.org/functest/brahmaputra/docs/results/index.html
380 Based on results collected in CI, a test dashboard is dynamically generated.
381 The URL of this dashboard is TODO LF
384 .. include:: ./troubleshooting.rst
390 .. _`[1]`: http://artifacts.opnfv.org/functest/docs/configguide/#functional-testing-installation
391 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
392 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
393 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
394 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
395 .. _`[6]`: https://wiki.opnfv.org/opnfv_test_dashboard
396 .. _`[7]`: http://testresults.opnfv.org/testapi/test_projects/functest/cases
397 .. _`[8]`: https://wiki.openstack.org/wiki/Governance/DefCoreCommittee
398 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
399 .. _`[10]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
400 .. _`[11]`: http://robotframework.org/
402 OPNFV main site: opnfvmain_.
404 OPNFV functional test page: opnfvfunctest_.
406 IRC support chan: #opnfv-testperf
408 .. _opnfvmain: http://www.opnfv.org
409 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
410 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
411 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
412 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
413 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml