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:
73 .. figure:: images/overall_description.png
75 :alt: overall description
79 -----------------------------
80 Description of the test cases
81 -----------------------------
83 Rally bench test suite
84 ======================
86 .. _Rally: https://wiki.openstack.org/wiki/Rally
88 The OPNFV scenarios are based on the collection of Rally_ default scenarios:
98 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.
100 This test suite provides performance information on VIM (OpenStack) part.
102 No SLA were defined for release 1, we just consider whether the tests are passed or failed.
104 In the future SLA shall be considered (e.g. accepting booting time for a given image with a given flavour).
106 Through its integration in Continuous Integration, the evolution of the performance of these tests shall also be considered.
111 .. _Tempest: http://docs.openstack.org/developer/tempest/overview.html
113 Tempest_ is the OpenStack Integration Test Suite. We use Rally to run Tempest suite.
115 The goal of this test is to check the OpenStack installation (sanity checks).
124 The goal of this test can be described as follow:
126 .. figure:: images/vPing.png
128 :alt: vPing description
130 The vPing test case is already present in Tempest suite.
132 This example, using OpenStack python clients can be considered as an "hellow World" example and may be modified for future use.
138 vIMS is one of the testcases defined by ETSI.
140 .. figure:: images/Ims_overview.png
142 :alt: IMS (src wikipedia)
144 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.
146 This functional test will verify that
147 * The OpenStack Nova API can be called to instantiate a set of VMs that together comprise a vIMS network function
148 * The OpenStack Glance service is capable of serving up the required images
149 * The virtual networking component of the platform can provide working IP connectivity between and among the VMs
150 * 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
152 Functional testing of vIMS in OPNFV Release 1 will be limited to a basic, non-scalable and non-fault-tolerant deployment of IMS.
153 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.
155 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.
157 .. _clearwater: http://www.projectclearwater.org/
159 The vIMS core function is based on the clearwater_ open source solution.
162 .. _tooling_installation:
164 ----------------------
166 ----------------------
168 2 tools are needed for the R1 functional tests:
176 .. _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html
178 .. _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html
180 The Rally creation can be describe as follow (ref: `Rally installation procedure`_):
181 * Create or enter a folder where you want to check out the tool repos.
182 * $ git clone https://git.openstack.org/openstack/rally
183 * $ ./rally/install_rally.sh
184 * 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)
185 * $ source Your_OpenRC_file
186 * $ rally deployment create --fromenv --name=my-opnfv-test
187 * $ rally-manage tempest install
189 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::
191 # rally deployment check
192 keystone endpoints are valid and following service are available:
193 +-------------+-----------+------------+
194 | Services | Type | Status |
195 +-----------+-------------+------------+
196 | cinder | volume | Available |
197 | cinderv2 | volumev2 | Available |
198 | glance | image | Available |
199 | keystone | identity | Available |
200 | neutron | network | Available |
201 | nova | compute | Available |
202 | nova_ec2 | compute_ec2 | Available |
203 | novav3 | computev3 | Available |
204 +-----------+-------------+------------+
207 +--------------------------------------+----------------------------------------------+------------+
208 | UUID | Name | Size (B) |
209 +--------------------------------------+----------------------------------------------+------------+
210 | 0a15951f-6388-4d5d-8531-79e7205eb140 | cirros_2015_04_10_13_13_18 | 13167616 |
211 | 67734efd-75f6-4919-991e-bba9855f3ae1 | Ubuntu 12.04 64b | 260637184 |
212 | b1504066-045a-4f8f-8919-8c665ef3f400 | Ubuntu 14.04 64b | 253297152 |
213 +--------------------------------------+----------------------------------------------+------------+
216 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
217 | ID | Name | vCPUs | RAM (MB) | Swap (MB) | Disk (GB) |
218 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
219 | 110e6375-a058-4af6-b21e-b765187904d2 | m1.medium | 2 | 1024 | | 20 |
220 | 7084d7e7-415a-455d-a55a-2ad286ddf7c9 | m1.large | 4 | 4096 | | 80 |
221 | a0345ba7-c667-4fd2-964f-7e98f8cda279 | m1.xlarge | 4 | 8192 | | 200 |
222 | accdc28c-5e20-4859-a5cc-61cf9009e56d | m1.small | 1 | 512 | | 10 |
223 +--------------------------------------+---------------------+-------+----------+-----------+-----------+
227 Summary: Set up python2.7 virtual environment::
232 pip install robotframework
233 pip install robotframework-sshlibrary
234 pip install robotframework-requests
237 ------------------------------
238 Functional test configuration
239 ------------------------------
244 Rally bench scenarios have been aggregated in json files.
245 A script has been developed to simplify the management of the tests and the integration in CI, get it from git::
247 # wget https://git.opnfv.org/cgit/functest/tree/testcases/VIM/OpenStack/CI/libraries/run_rally.py
249 Several scenarios are available (all based on native Rally scenarios):
259 * all (every module except tempest)
261 You can run the script as follow::
262 #python run_rally.py keystone
265 * get the json scenario (if not already available) and put it into the scenario folder
267 * generate the html result page into the result folder as opnfv-[module name]-[timestamp].html
268 * generate the json result page into the result folder as opnfv-[module name]-[timestamp].json
274 It is possible to use Rally to perform Tempest tests (ref: `tempest installation guide using Rally`_)
275 You just need to run::
279 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.
281 .. _`tempest installation guide using Rally`: https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler/
285 ODL wiki page describes system preparation and running tests. See `Integration Group CSIT`_.
287 .. _`Integration Group CSIT`: https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT
306 Results are available in the result folder through a html page and a json file.
311 You can get the results of tempest by typing::
321 Tests can be executed with script *start_test.sh* from directory *functest/testcases/Controllers/ODL/CI*. For usage example see::
323 # bash start_test.sh -h
338 Connection of your platform
339 ===========================
340 If you want to add your platform to the community automation, you need to declare your machine as a Jenkins slave.
341 * Send a mail to OPNFV LF Helpdesk (opnfv-helpdesk@rt.linuxfoundation.org)
342 * Create a local user jenkins on your machine
343 * wget http://mirrors.jenkins-ci.org/war/1.599/jenkins.war
344 * Extract contents, find the file named slave.jar and copy it to somewhere which jenkins user created in first step can access.
345 * Create a directory /home/jenkins/opnfv_slave_root
346 * check the java version (>1.7.0_75)
347 * Contact Linux Foundation to manage authentication of your server
348 * A key/token will be produced. Establish connection towards OPNFV Jenkins by using below command: java -jar slave.jar -jnlpUrl https://build.opnfv.org/ci/computer/<slave_name>/slave-agent.jnlp -secret <token>
350 Continuous integration scripts
351 ==============================
359 OPNFV main site: opnfvmain_.
361 OPNFV functional test page: opnfvfunctest_.
363 IRC support chan: #opnfv-testperf
365 .. _opnfvmain: http://www.opnfv.org
366 .. _opnfvfunctest: https://wiki.opnfv.org/opnfv_functional_testing