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 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]`_.
20 .. include:: ./introduction.rst
22 The different scenarios are described in the section hereafter.
24 VIM (Virtualized Infrastructure Manager)
30 Given the script 'ping.sh'::
34 ping -c 1 $1 2>&1 >/dev/null
36 if [ "Z$RES" = "Z0" ] ; then
45 The goal of this test is described as follows::
48 +-------------+ +-------------+
50 | | Boot VM1 with IP1 | |
51 | +------------------->| |
53 | | Boot VM2 | Under |
54 | +------------------->| Test |
56 | | Create floating IP | |
57 | +------------------->| |
59 | | Assign floating IP | |
61 | +------------------->| |
64 | | connection to VM2 | |
65 | | through floating IP| |
66 | +------------------->| |
68 | | SCP ping.sh to VM2 | |
69 | +------------------->| |
72 | | ping.sh to VM1 | |
73 | +------------------->| |
77 | | else (timeout) | |
80 +-------------+ +-------------+
82 This test can be considered as an "Hello World" example.
83 It is the first basic use case which shall work on any deployment.
88 The goal of this test can be described as follows::
90 vPing_userdata test case
91 +-------------+ +-------------+
93 | | Boot VM1 with IP1 | |
94 | +------------------->| |
97 | | ping.sh as userdata| |
98 | | with IP1 as $1. | |
99 | +------------------->| |
100 | Tester | | System |
101 | | VM2 exeutes ping.sh| Under |
102 | | (ping IP1) | Test |
103 | +------------------->| |
106 | | console-log VM 2 | |
109 | | else (timeout) | |
112 +-------------+ +-------------+
114 This scenario is similar to the previous one but it uses cloud-init (nova
115 metadata service) instead of floating IPs and SSH connection. When the second VM
116 boots it will execute the script automatically and the ping will be detected
117 capturing periodically the output in the console-log of the second VM.
123 Tempest `[2]`_ is the reference OpenStack Integration test suite.
124 It is a set of integration tests to be run against a live OpenStack cluster.
125 Tempest has batteries of tests for:
127 * OpenStack API validation
129 * Other specific tests useful in validating an OpenStack deployment
131 Functest uses Rally `[3]`_ to run the Tempest suite.
132 Rally generates automatically the Tempest configuration file (tempest.conf).
133 Before running the actual test cases, Functest creates the needed resources and
134 updates the appropriate parameters to the configuration file.
135 When the Tempest suite is executed, each test duration is measured and the full
136 console output is stored in the tempest.log file for further analysis.
138 As an addition of Arno, Brahmaputra runs a customized set of Tempest test cases.
139 The list is specificed through *--tests-file* when running Rally.
140 This option has been introduced in Rally in version 0.1.2.
142 The customized test list is available in the Functest repo `[4]`_.
143 This list contains more than 200 Tempest test cases and can be divided
144 into two main sections:
146 1) Set of tempest smoke test cases
147 2) Set of test cases from DefCore list `[8]`_
149 The goal of the Tempest test suite is to check the basic functionalities of
150 different OpenStack components on an OPNFV fresh installation using
151 the corresponding REST API interfaces.
154 Rally bench test suites
155 ^^^^^^^^^^^^^^^^^^^^^^^
157 Rally `[3]`_ is a benchmarking tool that answers the question::
159 “How does OpenStack work at scale?”.
161 The goal of this test suite is to benchmark the different OpenStack modules and
162 get significant figures that could help to define Telco Cloud KPIs.
164 The OPNFV scenarios are based on the collection of the existing Rally scenarios:
176 A basic SLA (stop test on errors) have been implemented.
182 Brahmaputra introduces new SDN controllers.
183 There are currently 3 possible controllers:
192 The OpenDaylight (ODL) test suite consists of a set of basic tests inherited
193 from the ODL project using the Robot `[11]`_ framework.
194 The suite verifies creation and deletion of networks, subnets and ports with
195 OpenDaylight and Neutron.
197 The list of tests can be described as follows:
199 * Restconf.basic: Get the controller modules via Restconf
202 * Check OpenStack Networks :: Checking OpenStack Neutron for known networks
203 * Check OpenDaylight Networks :: Checking OpenDaylight Neutron API
204 * Create Network :: Create new network in OpenStack
205 * Check Network :: Check Network created in OpenDaylight
206 * Neutron.Networks :: Checking Network created in OpenStack are pushed
210 * Check OpenStack Subnets :: Checking OpenStack Neutron for known Subnets
211 * Check OpenDaylight subnets :: Checking OpenDaylight Neutron API
212 * Create New subnet :: Create new subnet in OpenStack
213 * Check New subnet :: Check new subnet created in OpenDaylight
214 * Neutron.Subnets :: Checking Subnets created in OpenStack are pushed
218 * Check OpenStack ports :: Checking OpenStack Neutron for known ports
219 * Check OpenDaylight ports :: Checking OpenDaylight Neutron API
220 * Create New Port :: Create new port in OpenStack
221 * Check New Port :: Check new subnet created in OpenDaylight
222 * Neutron.Ports :: Checking Port created in OpenStack are pushed
226 * Delete previously created subnet in OpenStack
227 * Check subnet deleted in OpenDaylight
228 * Check subnet deleted in OpenStack
232 * Delete previously created network in OpenStack
233 * Check network deleted in OpenDaylight
234 * Check network deleted in OpenStack
240 TestON Framework is used to test the ONOS SDN controller functions.
241 The test cases deal with L2 and L3 functions.
242 The ONOS test suite can be run on any ONOS compliant scenario.
244 The test cases may be described as follows:
246 * onosfunctest: The main executable file contains the initialization of
247 the docker environment and functions called by FUNCvirNetNB and
252 * Create Network: Post Network data and check it in ONOS
253 * Update Network: Update the Network and compare it in ONOS
254 * Delete Network: Delete the Network and check if it's NULL in ONOS or
256 * Create Subnet: Post Subnet data and check it in ONOS
257 * Update Subnet: Update the Subnet and compare it in ONOS
258 * Delete Subnet: Delete the Subnet and check if it's NULL in ONOS or not
259 * Create Port: Post Port data and check it in ONOS
260 * Update Port: Update the Port and compare it in ONOS
261 * Delete Port: Delete the Port and check if it's NULL in ONOS or not
265 * Create Router: Post dataes for create Router and check it in ONOS
266 * Update Router: Update the Router and compare it in ONOS
267 * Delete Router: Delete the Router dataes and check it in ONOS
268 * Create RouterInterface: Post RouterInterface data to an exist Router
270 * Delete RouterInterface: Delete the RouterInterface and check the Router
271 * Create FloatingIp: Post dataes for create FloatingIp and check it in
273 * Update FloatingIp: Update the FloatingIp and compare it in ONOS
274 * Delete FloatingIp: Delete the FloatingIp and check if it's NULL in
276 * Create External Gateway: Post dataes for create External Gateway to an
277 exit Router and check it
278 * Update External Gateway: Update the External Gateway and compare it
279 * Delete External Gateway: Delete the External Gateway and check if it's
294 The goal of this test suite consists of:
296 * deploy a VNF orchestrator (Cloudify)
297 * deploy a Clearwater vIMS (IP Multimedia Subsystem) VNF from this
298 orchestrator based on a TOSCA blueprint defined in `[5]`_
299 * run suite of signaling tests on top of this VNF
301 The Clearwater architecture is described as follows:
303 .. figure:: ../images/clearwater-architecture.png
305 :alt: vIMS architecture
307 Two types of information are stored in the Test Database:
309 * the duration of each step (orchestion deployment, VNF deployment and test)
312 The deployment of a complete functional VNF allows the test of most of the
313 essential functions needed for a NFV platform.
318 Promise provides a basic set of test cases as part of Brahmaputra.
320 The available 33 test cases can be grouped into 7 test suites:
322 #. Add a new OpenStack provider into resource pool: Registers
323 OpenStack into a new resource pool and adds more capacity associated
326 #. Allocation without reservation: Creates a new server in OpenStack
327 and adds a new allocation record in Promise shim-layer.
329 #. Allocation using reservation for immediate use: Creates a resource
330 reservation record with no start/end time and immediately creates a new
331 server in OpenStack and add a new allocation record in Promise
334 #. Reservation for future use: Creates a resource reservation record
335 for a future start time, queries, modifies and cancels the newly created
338 #. Capacity planning: Decreases and increases the available capacity
339 from a provider in the future and queries the available collections and
342 #. Reservation with conflict: Tries to create reservations for
343 immediate and future use with conflict.
345 #. Cleanup test allocations: Destroys all allocations in OpenStack.
348 The specific parameters for Promise can be found in config_functest.yaml and
353 tenant_name: Name of the OpenStack tenant/project (e.g. promise)
354 tenant_description: Description of the OpenStack tenant (e.g. promise Functionality Testing)
355 user_name: Name of the user tenant (e.g. promiser)
356 user_pwd: Password of the user tenant (e.g. test)
357 image_name: Name of the software image (e.g. promise-img)
358 flavor_name: Name of the flavor (e.g. promise-flavor with 1 vCPU and 512 MB RAM)
363 However, these parameters must not be changed, as they are the values expected
364 by the Promise test suite.
366 .. include:: ./runfunctest.rst
371 For Brahmaputra test results, see the functest results document at:
372 http://artifacts.opnfv.org/functest/brahmaputra/docs/results/index.html
378 Based on results collected in CI, a test dashboard is dynamically generated.
379 The URL of this dashboard is TODO LF
382 .. include:: ./troubleshooting.rst
388 .. _`[1]`: Functest configuration guide URL
389 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
390 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
391 .. _`[4]`: http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf
392 .. _`[5]`: https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/blob/master/openstack-blueprint.yaml
393 .. _`[6]`: https://wiki.opnfv.org/opnfv_test_dashboard
394 .. _`[7]`: http://testresults.opnfv.org/testapi/test_projects/functest/cases
395 .. _`[8]`: https://wiki.openstack.org/wiki/Governance/DefCoreCommittee
396 .. _`[9]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
397 .. _`[10]`: https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
398 .. _`[11]`: http://robotframework.org/
400 OPNFV main site: opnfvmain_.
402 OPNFV functional test page: opnfvfunctest_.
404 IRC support chan: #opnfv-testperf
406 .. _opnfvmain: http://www.opnfv.org
407 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing
408 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
409 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
410 .. _`config_test.py` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.py
411 .. _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/testcases/config_functest.yaml