2954aaa83e5e7f9342d60ee0f17e699ca7ce0850
[functest.git] / docs / testing / user / userguide / introduction.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Overview of the Functest suites
5 ===============================
6
7 Functest is the OPNFV project primarily targeting function testing.
8 In the Continuous Integration pipeline, it is launched after an OPNFV fresh
9 installation to validate and verify the basic functions of the
10 infrastructure.
11
12 The current list of test suites can be distributed over 5 main domains: VIM
13 (Virtualised Infrastructure Manager), Controllers (i.e. SDN Controllers),
14 Features, VNF (Virtual Network Functions) and MANO stacks.
15
16 Functest test suites are also distributed in the OPNFV testing categories:
17 healthcheck, smoke, features, components, performance, VNF, Stress tests.
18
19 All the Healthcheck and smoke tests of a given scenario must be succesful to
20 validate the scenario for the release.
21
22 +-------------+---------------+----------------+----------------------------------+
23 | Domain      | Tier          | Test case      | Comments                         |
24 +=============+===============+================+==================================+
25 | VIM         | healthcheck   | connection     | Check OpenStack connectivity     |
26 |             |               | _check         | through SNAPS framework          |
27 |             |               +----------------+----------------------------------+
28 |             |               | api_check      | Check OpenStack API through      |
29 |             |               |                | SNAPS framework                  |
30 |             |               +----------------+----------------------------------+
31 |             |               | snaps_health   |  basic instance creation, check  |
32 |             |               | \_check        |  DHCP                            |
33 |             +---------------+----------------+----------------------------------+
34 |             | smoke         | vping_ssh      | NFV "Hello World" using an SSH   |
35 |             |               |                | connection to a destination VM   |
36 |             |               |                | over a created floating IP       |
37 |             |               |                | address on the SUT Public /      |
38 |             |               |                | External network. Using the SSH  |
39 |             |               |                | connection a test script is then |
40 |             |               |                | copied to the destination        |
41 |             |               |                | VM and then executed via SSH.    |
42 |             |               |                | The script will ping another     |
43 |             |               |                | VM on a specified IP address over|
44 |             |               |                | the SUT Private Tenant network.  |
45 |             |               +----------------+----------------------------------+
46 |             |               | vping_userdata | Uses Ping with given userdata    |
47 |             |               |                | to test intra-VM connectivity    |
48 |             |               |                | over the SUT Private Tenant      |
49 |             |               |                | network. The correct operation   |
50 |             |               |                | of the NOVA Metadata service is  |
51 |             |               |                | also verified in this test.      |
52 |             |               +----------------+----------------------------------+
53 |             |               | tempest_smoke  | Generate and run a relevant      |
54 |             |               | \_serial       | Tempest Test Suite in smoke mode.|
55 |             |               |                | The generated test set is        |
56 |             |               |                | dependent on the OpenStack       |
57 |             |               |                | deployment environment.          |
58 |             |               +----------------+----------------------------------+
59 |             |               | rally_sanity   | Run a subset of the OpenStack    |
60 |             |               |                | Rally Test Suite in smoke mode   |
61 |             |               +----------------+----------------------------------+
62 |             |               | snaps_smoke    | Run the SNAPS-OO integration     |
63 |             |               |                | tests                            |
64 |             |               +----------------+----------------------------------+
65 |             |               | refstack       | Reference RefStack suite         |
66 |             |               |   \_defcore    | tempest selection for NFV        |
67 |             +---------------+----------------+----------------------------------+
68 |             | components    | tempest_full   | Generate and run a full set of   |
69 |             |               | \_parallel     | the OpenStack Tempest Test Suite.|
70 |             |               |                | See the OpenStack reference test |
71 |             |               |                | suite `[2]`_. The generated      |
72 |             |               |                | test set is dependent on the     |
73 |             |               |                | OpenStack deployment environment.|
74 |             |               +----------------+----------------------------------+
75 |             |               | rally_full     | Run the OpenStack testing tool   |
76 |             |               |                | benchmarking OpenStack modules   |
77 |             |               |                | See the Rally documents `[3]`_.  |
78 |             |               +----------------+----------------------------------+
79 |             |               | tempest_custom | Allow to run a customized list   |
80 |             |               |                | of Tempest cases                 |
81 +-------------+---------------+----------------+----------------------------------+
82 | Controllers | smoke         | odl            | Opendaylight Test suite          |
83 |             |               |                | Limited test suite to check the  |
84 |             |               |                | basic neutron (Layer 2)          |
85 |             |               |                | operations mainly based on       |
86 |             |               |                | upstream testcases. See below    |
87 |             |               |                | for details                      |
88 |             |               +----------------+----------------------------------+
89 |             |               | onos           | Test suite of ONOS L2 and L3     |
90 |             |               |                | functions.                       |
91 |             |               |                | See `ONOSFW User Guide`_  for    |
92 |             |               |                | details.                         |
93 |             |               +----------------+----------------------------------+
94 |             |               | odl_netvirt    | Test Suite for the OpenDaylight  |
95 |             |               |                | SDN Controller when the NetVirt  |
96 |             |               |                | features are installed. It       |
97 |             |               |                | integrates some test suites from |
98 |             |               |                | upstream using Robot as the test |
99 |             |               |                | framework                        |
100 |             |               +----------------+----------------------------------+
101 |             |               | fds            | Test Suite for the OpenDaylight  |
102 |             |               |                | SDN Controller when the GBP      |
103 |             |               |                | features are installed. It       |
104 |             |               |                | integrates some test suites from |
105 |             |               |                | upstream using Robot as the test |
106 |             |               |                | framework                        |
107 +-------------+---------------+----------------+----------------------------------+
108 | Features    | features      | bgpvpn         | Implementation of the OpenStack  |
109 |             |               |                | bgpvpn API from the SDNVPN       |
110 |             |               |                | feature project. It allows for   |
111 |             |               |                | the creation of BGP VPNs.        |
112 |             |               |                | See `SDNVPN User Guide`_ for     |
113 |             |               |                | details                          |
114 |             |               +----------------+----------------------------------+
115 |             |               | doctor         | Doctor platform, as of Colorado  |
116 |             |               |                | release, provides the three      |
117 |             |               |                | features:                        |
118 |             |               |                | * Immediate Notification         |
119 |             |               |                | * Consistent resource state      |
120 |             |               |                | awareness for compute host down  |
121 |             |               |                | * Valid compute host status      |
122 |             |               |                | given to VM owner                |
123 |             |               |                | See `Doctor User Guide`_ for     |
124 |             |               |                | details                          |
125 |             |               +----------------+----------------------------------+
126 |             |               | domino         | Domino provides TOSCA template   |
127 |             |               |                | distribution service for network |
128 |             |               |                | service and VNF descriptors      |
129 |             |               |                | among MANO components e.g.,      |
130 |             |               |                | NFVO, VNFM, VIM, SDN-C, etc.,    |
131 |             |               |                | as well as OSS/BSS functions.    |
132 |             |               |                | See `Domino User Guide`_ for     |
133 |             |               |                | details                          |
134 |             |               +----------------+----------------------------------+
135 |             |               | multisite      | Multisite                        |
136 |             |               |                | See `Multisite User Guide`_ for  |
137 |             |               |                | details                          |
138 |             |               +----------------+----------------------------------+
139 |             |               | odl-sfc        | SFC testing for odl scenarios    |
140 |             |               |                | See `SFC User Guide`_ for details|
141 |             |               +----------------+----------------------------------+
142 |             |               | parser         | Parser is an integration project |
143 |             |               |                | which aims to provide            |
144 |             |               |                | placement/deployment templates   |
145 |             |               |                | translation for OPNFV platform,  |
146 |             |               |                | including TOSCA -> HOT, POLICY ->|
147 |             |               |                | TOSCA and YANG -> TOSCA. it      |
148 |             |               |                | deals with a fake vRNC.          |
149 |             |               |                | See `Parser User Guide`_ for     |
150 |             |               |                | details                          |
151 |             |               +----------------+----------------------------------+
152 |             |               | promise        | Resource reservation and         |
153 |             |               |                | management project to identify   |
154 |             |               |                | NFV related requirements and     |
155 |             |               |                | realize resource reservation for |
156 |             |               |                | future usage by capacity         |
157 |             |               |                | management of resource pools     |
158 |             |               |                | regarding compute, network and   |
159 |             |               |                | storage.                         |
160 |             |               |                | See `Promise User Guide`_ for    |
161 |             |               |                | details.                         |
162 |             |               +----------------+----------------------------------+
163 |             |               | security_scan  | Implementation of a simple       |
164 |             |               |                | security scan. (Currently        |
165 |             |               |                | available only for the Apex      |
166 |             |               |                | installer environment)           |
167 +-------------+---------------+----------------+----------------------------------+
168 | VNF         | vnf           | cloudify_ims   | Example of a real VNF deployment |
169 |             |               |                | to show the NFV capabilities of  |
170 |             |               |                | the platform. The IP Multimedia  |
171 |             |               |                | Subsytem is a typical Telco test |
172 |             |               |                | case, referenced by ETSI.        |
173 |             |               |                | It provides a fully functional   |
174 |             |               |                | VoIP System                      |
175 |             |               +----------------+----------------------------------+
176 |             |               | orchestra_ims  | OpenIMS deployment using         |
177 |             |               |                | Openbaton orchestrator           |
178 |             |               +----------------+----------------------------------+
179 |             |               | vyos_vrouter   | vRouter testing                  |
180 +-------------+---------------+----------------+----------------------------------+
181
182
183 As shown in the above table, Functest is structured into different 'domains',
184 'tiers' and 'test cases'. Each 'test case' usually represents an actual
185 'Test Suite' comprised -in turn- of several test cases internally.
186
187 Test cases also have an implicit execution order. For example, if the early
188 'healthcheck' Tier testcase fails, or if there are any failures in the 'smoke'
189 Tier testcases, there is little point to launch a full testcase execution round.
190
191 In Danube, we merged smoke and sdn controller tiers in smoke tier.
192
193 An overview of the Functest Structural Concept is depicted graphically below:
194
195 .. figure:: ../../../images/concepts_mapping_final.png
196    :align: center
197    :alt: Functest Concepts Structure
198
199 Some of the test cases are developed by Functest team members, whereas others
200 are integrated from upstream communities or other OPNFV projects. For example,
201 `Tempest <http://docs.openstack.org/developer/tempest/overview.html>`_ is the
202 OpenStack integration test suite and Functest is in charge of the selection,
203 integration and automation of those tests that fit suitably to OPNFV.
204
205 The Tempest test suite is the default OpenStack smoke test suite but no new test
206 cases have been created in OPNFV Functest.
207
208 The results produced by the tests run from CI are pushed and collected into a
209 NoSQL database. The goal is to populate the database with results from different
210 sources and scenarios and to show them on a `Functest Dashboard`_. A screenshot
211 of a live Functest Dashboard is shown below:
212
213 .. figure:: ../../../images/FunctestDashboardDanube.png
214    :align: center
215    :alt: Functest Dashboard
216
217
218 Basic components (VIM, SDN controllers) are tested through their own suites.
219 Feature projects also provide their own test suites with different ways of
220 running their tests.
221
222 The notion of domain has been introduced in the description of the test cases
223 stored in the Database.
224 This parameters as well as possible tags can be used for the Test case catalog.
225
226 vIMS test case was integrated to demonstrate the capability to deploy a
227 relatively complex NFV scenario on top of the OPNFV infrastructure.
228
229 Functest considers OPNFV as a black box. As of Danube release the OPNFV
230 offers a lot of potential combinations:
231
232   * 3 controllers (OpenDaylight, ONOS, OpenContrail)
233   * 4 installers (Apex, Compass, Fuel, Joid)
234
235 Most of the tests are runnable by any combination, but some tests might have
236 restrictions imposed by the utilized installers or due to the available
237 deployed features. The system uses the environment variables (INSTALLER_IP and
238 DEPLOY_SCENARIO) to automatically determine the valid test cases, for each given
239 environment.
240
241 A convenience Functest CLI utility is also available to simplify setting up the
242 Functest evironment, management of the OpenStack environment (e.g. resource
243 clean-up) and for executing tests.
244 The Functest CLI organised the testcase into logical Tiers, which contain in
245 turn one or more testcases. The CLI allows execution of a single specified
246 testcase, all test cases in a specified Tier, or the special case of execution
247 of **ALL** testcases. The Functest CLI is introduced in more detail in the
248 section `Executing the functest suites`_ of this document.
249
250 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
251 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
252 .. _`Doctor User Guide`: http://artifacts.opnfv.org/doctor/colorado/userguide/index.html
253 .. _`Promise User Guide`: http://artifacts.opnfv.org/promise/colorado/docs/userguide/index.html
254 .. _`ONOSFW User Guide`: http://artifacts.opnfv.org/onosfw/colorado/userguide/index.html
255 .. _`SDNVPN User Guide`: http://artifacts.opnfv.org/sdnvpn/colorado/docs/userguide/index.html
256 .. _`Domino User Guide`: http://artifacts.opnfv.org/domino/docs/userguide-single/index.html
257 .. _`Parser User Guide`: http://artifacts.opnfv.org/parser/colorado/docs/userguide/index.html
258 .. _`Functest Dashboard`: http://testresults.opnfv.org/kibana_dashboards/
259 .. _`SFC User Guide`: http://artifacts.opnfv.org/sfc/colorado/userguide/index.html
260 .. _`Multisite User Guide`: http://artifacts.opnfv.org/multisite/docs/userguide/index.html