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)
27 ----------------------------------------
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 2 possible controllers:
193 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
194 from the ODL project using the Robot `[11]`_ framework.
195 The suite verifies creation and deletion of networks, subnets and ports with
196 OpenDaylight and Neutron.
198 The list of tests can be described as follows:
200 * Restconf.basic: Get the controller modules via Restconf
203 * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
204 * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
205 * Create Network :: Create new network in OpenStack
206 * Check Network :: Check Network created in OpenDaylight
207 * Neutron.Networks :: Checking Network created in OpenStack are pushed
211 * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
212 * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
213 * Create New subnet :: Create new subnet in OpenStack
214 * Check New subnet :: Check new subnet created in OpenDaylight
215 * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
219 * Check OpenStack ports :: Checking OpenStack Neutron for known ports
220 * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
221 * Create New Port :: Create new port in OpenStack
222 * Check New Port :: Check new subnet created in OpenDaylight
223 * Neutron.Ports :: Checking Port created in OpenStack are pushed
227 * Delete previously created subnet in OpenStack
228 * Check subnet deleted in OpenDaylight
229 * Check subnet deleted in OpenStack
233 * Delete previously created network in OpenStack
234 * Check network deleted in OpenDaylight
235 * Check network deleted in OpenStack
241 TestON Framework is used to test the ONOS SDN controller functions.
242 The test cases deal with L2 and L3 functions.
243 The ONOS test suite can be run on any ONOS compliant scenario.
245 The test cases may be described as follows:
247 * onosfunctest: The main executable file contains the initialization of
248 the docker environment and functions called by FUNCvirNetNB and
253 * Create Network: Post Network data and check it in ONOS
254 * Update Network: Update the Network and compare it in ONOS
255 * Delete Network: Delete the Network and check if it's NULL in ONOS or
257 * Create Subnet: Post Subnet data and check it in ONOS
258 * Update Subnet: Update the Subnet and compare it in ONOS
259 * Delete Subnet: Delete the Subnet and check if it's NULL in ONOS or not
260 * Create Port: Post Port data and check it in ONOS
261 * Update Port: Update the Port and compare it in ONOS
262 * Delete Port: Delete the Port and check if it's NULL in ONOS or not
266 * Create Router: Post dataes for create Router and check it in ONOS
267 * Update Router: Update the Router and compare it in ONOS
268 * Delete Router: Delete the Router dataes and check it in ONOS
269 * Create RouterInterface: Post RouterInterface data to an exist Router
271 * Delete RouterInterface: Delete the RouterInterface and check the Router
272 * Create FloatingIp: Post dataes for create FloatingIp and check it in
274 * Update FloatingIp: Update the FloatingIp and compare it in ONOS
275 * Delete FloatingIp: Delete the FloatingIp and check if it's NULL in
277 * Create External Gateway: Post dataes for create External Gateway to an
278 exit Router and check it
279 * Update External Gateway: Update the External Gateway and compare it
280 * Delete External Gateway: Delete the External Gateway and check if it's
289 The goal of this test suite consists of:
291 * deploy a VNF orchestrator (Cloudify)
292 * deploy a Clearwater vIMS (IP Multimedia Subsystem) VNF from this
293 orchestrator based on a TOSCA blueprint defined in `[5]`_
294 * run suite of signaling tests on top of this VNF
296 The Clearwater architecture is described as follows:
298 .. figure:: ../images/clearwater-architecture.png
300 :alt: vIMS architecture
302 Two types of information are stored in the Test Database:
304 * the duration of each step (orchestion deployment, VNF deployment and test)
307 The deployment of a complete functional VNF allows the test of most of the
308 essential functions needed for a NFV platform.
313 Promise provides a basic set of test cases as part of Brahmaputra.
315 The available 33 test cases can be grouped into 7 test suites:
317 #. Add a new OpenStack provider into resource pool: Registers
318 OpenStack into a new resource pool and adds more capacity associated
321 #. Allocation without reservation: Creates a new server in OpenStack
322 and adds a new allocation record in Promise shim-layer.
324 #. Allocation using reservation for immediate use: Creates a resource
325 reservation record with no start/end time and immediately creates a new
326 server in OpenStack and add a new allocation record in Promise
329 #. Reservation for future use: Creates a resource reservation record
330 for a future start time, queries, modifies and cancels the newly created
333 #. Capacity planning: Decreases and increases the available capacity
334 from a provider in the future and queries the available collections and
337 #. Reservation with conflict: Tries to create reservations for
338 immediate and future use with conflict.
340 #. Cleanup test allocations: Destroys all allocations in OpenStack.
343 The specific parameters for Promise can be found in config_functest.yaml and
348 tenant_name: Name of the OpenStack tenant/project (e.g. promise)
349 tenant_description: Description of the OpenStack tenant (e.g. promise Functionality Testing)
350 user_name: Name of the user tenant (e.g. promiser)
351 user_pwd: Password of the user tenant (e.g. test)
352 image_name: Name of the software image (e.g. promise-img)
353 flavor_name: Name of the flavor (e.g. promise-flavor with 1 vCPU and 512 MB RAM)
358 However, these parameters must not be changed, as they are the values expected
359 by the Promise test suite.
363 Doctor test case: Doctor-notification: immediate notification for fault
365 The Doctor test is successful if the notification time is below 1 second.
367 .. include:: ./runfunctest.rst
372 For Brahmaputra test results, see the functest results document at:
373 http://artifacts.opnfv.org/functest/brahmaputra/docs/results/index.html
379 Based on results collected in CI, a test dashboard is dynamically generated:
380 https://www.opnfv.org/opnfvtestgraphs/per-test-projects/default
382 A specific dashboard has been created for functest:
383 http://testresults.opnfv.org/dashboard/
385 .. include:: ./troubleshooting.rst
391 .. _`[1]`: http://artifacts.opnfv.org/functest/docs/configguide/#functional-testing-installation
392 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
393 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
394 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
395 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
396 .. _`[6]`: https://wiki.opnfv.org/opnfv_test_dashboard
397 .. _`[7]`: http://testresults.opnfv.org/testapi/test_projects/functest/cases
398 .. _`[8]`: https://wiki.openstack.org/wiki/Governance/DefCoreCommittee
399 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
400 .. _`[10]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
401 .. _`[11]`: http://robotframework.org/
403 OPNFV main site: opnfvmain_.
405 OPNFV functional test page: opnfvfunctest_.
407 IRC support chan: #opnfv-testperf
409 .. _opnfvmain: http://www.opnfv.org
410 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
411 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
412 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
413 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
414 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml