1 ===========================
2 OPNFV functional test guide
3 ===========================
5 Testing is a key challenge of OPNFV.
6 It shall be possible to run functional tests on any OPNFV solution.
8 The goal of this document consists in
9 * a description of functional tests for OPNFV
10 * a description of the tools needed to perform these tests
11 * the procedure to configure the tools and the scenarios associated with these tests
13 Functional tests shall be automated and collected results shall be used to improve the robustness and the reliability of the overall system.
15 Function tests may cover any domain that could lead to improve the OPNFV solution and define "Telco Cloud" KPI.
17 The last section also describes how to automate these tests within the OPNFV continuous integration project.
19 .. _ETSI: http://docbox.etsi.org/ISG/NFV/Open/Published/gs_NFV001v010101p%20-%20Use%20Cases.pdf
21 ETSI NFV defined 9 use cases (ref ETSI_):
24 * VNF Forwarding graphs
25 * Virtual Network Platform as a Service
26 * Virtualisation of Mobile Core and IMS
27 * Virtualisation of Mobile station
29 * Virtualization of CDNs (vCDN)
30 * Virtualization of the Home environment
32 .. _`Openstack Telco Working Group`: https://wiki.openstack.org/wiki/TelcoWorkingGroup
34 Most of the use cases are also discussed in upstream projects (e.g. `Openstack Telco Working Group`_ )
36 For release 1 (Arno), 5 test suites have been selected:
37 * Rally Bench test suite for Openstack
38 * Openstack Tempest test suite
39 * OpenDaylight test suite
43 The 3 first suites are directly inherited from upstream projects.
44 vPing, that is already present in Tempest suite, has been developped to provided a basic "hellow world" functional test example.
46 .. _`Continuous Integration`: https://build.opnfv.org/ci/view/functest/
48 vEPC, vPE, vHGW, vCDN use cases are not considered for first release.
49 It does not mean that such use cases cannot be tested on OPNFV Arno.
50 It means that these use cases have not been integrated in the `Continuous Integration`_ and no specific work (integration or developpment) have been done for R1.
57 We assume that an OPNFV solution has been installed.
61 The installation of the OPNFV solution is out of scope of this document but can be found [here_].
62 In the rest of the document the OPNFV solution would be considered as the System Under Test (SUT).
64 The installation and configuration of the tools needed to perform the tests will be described in the following sections.
66 For release 1, the tools are not automatically installed.
68 .. _pharos: https://wiki.opnfv.org/pharos
70 It is recommended to install the different tools on the jump host server as defined in the pharos_ project.
71 The high level architecture can be described as follow:
75 CIMC/Lights+out management Admin Private Public Storage
81 | +-----------------+ | | + |
83 +-----+ Jumpserver | | | | |
84 | | +---------------------+ | | |
86 | | +----------+ | | | | |
87 | | | Rally | +---- --------------------------+ | |
89 | | | Robot | | | | | |
91 | | | vPing | | | | | |
93 | | | vIMS | | | | | |
94 | | +----------+ | | | | |
95 | | FuncTests +-----------------------------------------+ |
97 | | +--------------------------------------------------+
99 | +-----------------+ | | | |
101 | +----------------+ | | | |
103 +----+ +--------------+-+ | | | |
105 | | | +--------------+-+ | | | |
107 | | | | +--------------+-+ | | | |
108 | | | | | 4 | | | | |
109 | +-+ | | +--------------+-+ | | | |
110 | | | | | 5 +---------------+ | | |
111 | +-+ | | nodes for | | | | |
112 | | | | deploying +-------------------------+ | |
113 | +-+ | opnfv | | | | |
114 | | | SUT +-----------------------------------+ |
116 | | +--------------------------------------------+
117 | +----------------+ | | | |
123 -----------------------------
124 Description of the test cases
125 -----------------------------
127 Rally bench test suite
128 ======================
130 .. _Rally: https://wiki.openstack.org/wiki/Rally
132 The OPNFV scenarios are based on the collection of Rally_ default scenarios:
142 The goal of this test suite is to test the different modules of OpenStack and get significant figures that could help us to define telco Cloud KPI.
144 This test suite provides performance information on VIM (OpenStack) part.
146 No SLA were defined for release 1, we just consider whether the tests are passed or failed.
148 In the future SLA shall be considered (e.g. accepting booting time for a given image with a given flavour).
150 Through its integration in Continuous Integration, the evolution of the performance of these tests shall also be considered.
155 .. _Tempest: http://docs.openstack.org/developer/tempest/overview.html
157 Tempest_ is the OpenStack Integration Test Suite. We use Rally to run Tempest suite.
159 The goal of this test is to check the OpenStack installation (sanity checks).
168 The goal of this test can be described as follow:
173 +-------------+ +-------------+
176 | +------------------>| |
179 | +------------------>| |
180 | Tester | | System |
181 | | Boot VM2 | Under |
182 | +------------------>| Test |
183 | | Including Ping | |
184 | |at the end of boot | |
187 | | Check console | |
189 | +------------------>| |
191 +-------------+ +-------------+
194 The vPing test case is already present in Tempest suite.
196 This example, using OpenStack python clients can be considered as an "hellow World" example and may be modified for future use.
202 vIMS is one of the testcases defined by ETSI.
204 .. figure:: images/Ims_overview.png
206 :alt: IMS (src wikipedia)
208 the goal of this test consists in deploying a virtualized IP Multimedia Subsystem (vIMS) on OPNFV, configuring it to deliver services to a set of emulated SIP endpoints, deploying a virtualized test system that implements those emulated SIP endpoints, and performing a series of simple functional tests on the vIMS, including the ability to establish SIP sessions between emulated endpoints.
210 This functional test will verify that
211 * The OpenStack Nova API can be called to instantiate a set of VMs that together comprise a vIMS network function
212 * The OpenStack Glance service is capable of serving up the required images
213 * The virtual networking component of the platform can provide working IP connectivity between and among the VMs
214 * The platform as a whole is capable of supporting the running of a real virtualized network function that delivers a typical service offered by a network operator, i.e. voice telephony
216 Functional testing of vIMS in OPNFV Release 1 will be limited to a basic, non-scalable and non-fault-tolerant deployment of IMS.
217 Furthermore, in this release the vIMS will perform only control plane functions (i.e. processing of SIP signaling messages) and will not be passing RTP media streams.
219 In future releases, the same software elements can be deployed with multiple instances of each VNF component to provide a fault tolerant and dynamically scalable deployment of IMS. With the addition of virtualized Session Border Controller software elements, the scope of vIMS functional testing can be further expanded to include the handling of RTP media.
221 .. _clearwater: http://www.projectclearwater.org/
223 The vIMS core function is based on the clearwater_ open source solution.
226 .. _tooling_installation:
228 ----------------------
230 ----------------------
232 2 external tools are needed for the R1 functional tests:
240 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
242 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
244 The Rally creation can be describe as follow (ref: `Rally installation procedure`_):
245 * Create or enter a folder where you want to check out the tool repos.
246 * $ git clone https://git.openstack.org/openstack/rally
247 * $ ./rally/install_rally.sh
248 * configure your `OpenRC`_ file to let Rally access to your OpenStack, you can either export it from Horizon or build it manually (OpenStack credentials are required)
249 * $ source Your_OpenRC_file
250 * $ rally deployment create --fromenv --name=my-opnfv-test
251 * $ rally-manage tempest install
253 You can check if the configuration of rally is fine by typing 'rally deployment check', you shall see the list of available services as follow::
255 # rally deployment check
256 keystone endpoints are valid and following service are available:
257 +-------------+-----------+------------+
258 | Services | Type | Status |
259 +-----------+-------------+------------+
260 | cinder | volume | Available |
261 | cinderv2 | volumev2 | Available |
262 | glance | image | Available |
263 | keystone | identity | Available |
264 | neutron | network | Available |
265 | nova | compute | Available |
266 | nova_ec2 | compute_ec2 | Available |
267 | novav3 | computev3 | Available |
268 +-----------+-------------+------------+
271 +--------------------------------------+----------------------------------------------+------------+
272 | UUID | Name | Size (B) |
273 +--------------------------------------+----------------------------------------------+------------+
274 | 0a15951f-6388-4d5d-8531-79e7205eb140 | cirros_2015_04_10_13_13_18 | 13167616 |
275 | 67734efd-75f6-4919-991e-bba9855f3ae1 | Ubuntu 12.04 64b | 260637184 |
276 | b1504066-045a-4f8f-8919-8c665ef3f400 | Ubuntu 14.04 64b | 253297152 |
277 +--------------------------------------+----------------------------------------------+------------+
280 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
281 | ID | Name | vCPUs | RAM (MB) | Swap (MB) | Disk (GB) |
282 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
283 | 110e6375-a058-4af6-b21e-b765187904d2 | m1.medium | 2 | 1024 | | 20 |
284 | 7084d7e7-415a-455d-a55a-2ad286ddf7c9 | m1.large | 4 | 4096 | | 80 |
285 | a0345ba7-c667-4fd2-964f-7e98f8cda279 | m1.xlarge | 4 | 8192 | | 200 |
286 | accdc28c-5e20-4859-a5cc-61cf9009e56d | m1.small | 1 | 512 | | 10 |
287 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
291 Summary: Set up python2.7 virtual environment::
296 pip install robotframework
297 pip install robotframework-sshlibrary
298 pip install robotframework-requests
304 Make sure that nova services are up::
307 +----+----------------+--------+----------+---------+-------+
308 | Id | Binary | Host | Zone | Status | State |
309 +----+----------------+--------+----------+---------+-------+
310 | 1 | nova-conductor | xxxxxx | internal | enabled | up |
311 | 3 | nova-network | xxxxxx | internal | enabled | up |
312 | 4 | nova-scheduler | xxxxxx | internal | enabled | up |
313 | 5 | nova-compute | xxxxxx | nova | enabled | up |
314 +----+----------------+--------+----------+---------+-------+
317 .. _vPing.py: https://git.opnfv.org/cgit/functest/tree/testcases/vPing/CI/libraries/vPing.py
319 Retrieve vPing.py_ script from OPNFV git repo
321 Make sure you have sourced your OpenRC file::
323 # source Your_OpenRC_file
325 ------------------------------
326 Functional test configuration
327 ------------------------------
332 Rally bench scenarios have been aggregated in json files.
333 A script has been developed to simplify the management of the tests and the integration in CI, get it from git::
335 # wget https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/run_rally.py
337 Several scenarios are available (all based on native Rally scenarios):
347 * all (every module except tempest)
349 You can run the script as follow::
351 # python run_rally.py keystone
354 * get the json scenario (if not already available) and put it into the scenario folder
356 * generate the html result page into the result folder as opnfv-[module name]-[timestamp].html
357 * generate the json result page into the result folder as opnfv-[module name]-[timestamp].json
363 It is possible to use Rally to perform Tempest tests (ref: `tempest installation guide using Rally`_)
364 You just need to run::
368 The different modes available are smoke, baremetal, compute, data_processing, identity, image, network, object_storage, orchestration, telemetry, and volume. By default if you do not precise anything then smoke tests be selected by default.
370 .. _`tempest installation guide using Rally`: https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
374 ODL wiki page describes system preparation and running tests. See `Integration Group CSIT`_.
376 .. _`Integration Group CSIT`: https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT
382 By default, the script’s is configured as follow::
386 * OS_AUTH_URL: http://192.168.20.71:5000/v2.0
387 * OS_TENANT_NAME: invisible_to_admin
388 * Name of VM: opnfv-vping-1 , opnfv-vping-2
390 * Image: Ubuntu 14.04 (amd64)
393 The script needs to be tuned to your specific system configuration
409 Results are available in the result folder through a html page and a json file.
414 You can get the results of tempest by typing::
424 Tests can be executed with script *start_test.sh* from directory *functest/testcases/Controllers/ODL/CI*. For usage example see::
426 # bash start_test.sh -h
430 The test can be executed with command::
444 Connection of your platform
445 ===========================
447 .. _`Octopus procedure`: https://wiki.opnfv.org/octopus/jenkins_slave_connection/
449 If you want to add your platform to the community automation, please follow the `Octopus procedure`_.
451 Integrating into CI Pipeline
452 ============================
454 .. _`pipeline document`: https://wiki.opnfv.org/octopus/pipelines
456 Contact Octopus Team (#opnfv-octopus) and see `pipeline document`_ for more details.
464 OPNFV main site: opnfvmain_.
466 OPNFV functional test page: opnfvfunctest_.
468 IRC support chan: #opnfv-testperf
470 .. _opnfvmain: http://www.opnfv.org
471 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing