Merge "Update graphs in userguide"
[functest.git] / docs / testing / user / userguide / test_overview.rst
1 .. SPDX-License-Identifier: CC-BY-4.0
2
3 Overview of the Functest suites
4 ===============================
5
6 Functest is the OPNFV project primarily targeting functional testing.
7 In the Continuous Integration pipeline, it is launched after an OPNFV fresh
8 installation to validate and verify the basic functions of the
9 infrastructure.
10
11 The current list of test suites can be distributed over 5 main domains:
12   * VIM (Virtualised Infrastructure Manager)
13   * Controllers (i.e. SDN Controllers)
14   * Features
15   * VNF (Virtual Network Functions)
16   * Kubernetes
17
18 Functest test suites are also distributed in the OPNFV testing categories:
19 healthcheck, smoke, features, components, performance, VNF, Stress tests.
20
21 All the Healthcheck and smoke tests of a given scenario must be succesful to
22 validate the scenario for the release.
23
24 +-------------+---------------+------------+----------------------------------+
25 | Domain      | Tier          | Test case  | Comments                         |
26 +=============+===============+============+==================================+
27 | VIM         | healthcheck   | connection | Check OpenStack connectivity     |
28 |             |               | \_check    | through SNAPS framework          |
29 |             |               +------------+----------------------------------+
30 |             |               | api_check  | Check OpenStack API through      |
31 |             |               |            | SNAPS framework                  |
32 |             |               +------------+----------------------------------+
33 |             |               | snaps      | basic instance creation, check   |
34 |             |               | \_health   | DHCP                             |
35 |             |               | \_check    |                                  |
36 |             +---------------+------------+----------------------------------+
37 |             | smoke         | vping_ssh  | NFV "Hello World" using an SSH   |
38 |             |               |            | connection to a destination VM   |
39 |             |               |            | over a created floating IP       |
40 |             |               |            | address on the SUT Public /      |
41 |             |               |            | External network. Using the SSH  |
42 |             |               |            | connection a test script is then |
43 |             |               |            | copied to the destination        |
44 |             |               |            | VM and then executed via SSH.    |
45 |             |               |            | The script will ping another     |
46 |             |               |            | VM on a specified IP address over|
47 |             |               |            | the SUT Private Tenant network   |
48 |             |               +------------+----------------------------------+
49 |             |               | vping      | Uses Ping with given userdata    |
50 |             |               | \_userdata | to test intra-VM connectivity    |
51 |             |               |            | over the SUT Private Tenant      |
52 |             |               |            | network. The correct operation   |
53 |             |               |            | of the NOVA Metadata service is  |
54 |             |               |            | also verified in this test       |
55 |             |               +------------+----------------------------------+
56 |             |               | tempest    | Generate and run a relevant      |
57 |             |               | \_smoke    | Tempest Test Suite in smoke mode.|
58 |             |               | \_serial   | The generated test set is        |
59 |             |               |            | dependent on the OpenStack       |
60 |             |               |            | deployment environment           |
61 |             |               +------------+----------------------------------+
62 |             |               | rally      | Run a subset of the OpenStack    |
63 |             |               | \_sanity   | Rally Test Suite in smoke mode   |
64 |             |               +------------+----------------------------------+
65 |             |               | snaps\     | Run the SNAPS-OO integration     |
66 |             |               | \_smoke    | tests                            |
67 |             |               +------------+----------------------------------+
68 |             |               | refstack   | Reference RefStack suite         |
69 |             |               | \_defcore  | tempest selection for NFV        |
70 |             |               +------------+----------------------------------+
71 |             |               | patrole    | Patrole is a tempest plugin for  |
72 |             |               |            | testing and verifying RBAC policy|
73 |             |               |            | enforcement, which offers testing|
74 |             |               |            | for the following OpenStack      |
75 |             |               |            | services: Nova, Neutron, Glance, |
76 |             |               |            | Cinder and Keystone              |
77 |             +---------------+------------+----------------------------------+
78 |             |               | neutron    | The neutron trunk port testcases |
79 |             |               | \_trunk    | have been introduced and they are|
80 |             |               |            | supported by installers :        |
81 |             |               |            | Apex, Fuel and Compass.          |
82 |             +---------------+------------+----------------------------------+
83 |             | components    | tempest    | Generate and run a full set of   |
84 |             |               | \_full     | the OpenStack Tempest Test Suite.|
85 |             |               | \_parallel | See the OpenStack reference test |
86 |             |               |            | suite `[2]`_. The generated      |
87 |             |               |            | test set is dependent on the     |
88 |             |               |            | OpenStack deployment environment |
89 |             |               +------------+----------------------------------+
90 |             |               | rally_full | Run the OpenStack testing tool   |
91 |             |               |            | benchmarking OpenStack modules   |
92 |             |               |            | See the Rally documents `[3]`_   |
93 +-------------+---------------+------------+----------------------------------+
94 | Controllers | smoke         | odl        | Opendaylight Test suite          |
95 |             |               |            | Limited test suite to check the  |
96 |             |               |            | basic neutron (Layer 2)          |
97 |             |               |            | operations mainly based on       |
98 |             |               |            | upstream testcases. See below    |
99 |             |               |            | for details                      |
100 +-------------+---------------+------------+----------------------------------+
101 | Features    | features      | bgpvpn     | Implementation of the OpenStack  |
102 |             |               |            | bgpvpn API from the SDNVPN       |
103 |             |               |            | feature project. It allows for   |
104 |             |               |            | the creation of BGP VPNs.        |
105 |             |               |            | See `SDNVPN User Guide`_ for     |
106 |             |               |            | details                          |
107 |             |               +------------+----------------------------------+
108 |             |               | doctor     | Doctor platform, as of Colorado  |
109 |             |               |            | release, provides the three      |
110 |             |               |            | features:                        |
111 |             |               |            | * Immediate Notification         |
112 |             |               |            | * Consistent resource state      |
113 |             |               |            | awareness for compute host down  |
114 |             |               |            | * Valid compute host status      |
115 |             |               |            | given to VM owner                |
116 |             |               |            | See `Doctor User Guide`_ for     |
117 |             |               |            | details                          |
118 |             |               +------------+----------------------------------+
119 |             |               | odl-sfc    | SFC testing for odl scenarios    |
120 |             |               |            | See `SFC User Guide`_ for details|
121 |             |               +------------+----------------------------------+
122 |             |               | parser     | Parser is an integration project |
123 |             |               |            | which aims to provide            |
124 |             |               |            | placement/deployment templates   |
125 |             |               |            | translation for OPNFV platform,  |
126 |             |               |            | including TOSCA -> HOT, POLICY ->|
127 |             |               |            | TOSCA and YANG -> TOSCA. it      |
128 |             |               |            | deals with a fake vRNC.          |
129 |             |               |            | See `Parser User Guide`_ for     |
130 |             |               |            | details                          |
131 |             |               +------------+----------------------------------+
132 |             |               | fds        | Test Suite for the OpenDaylight  |
133 |             |               |            | SDN Controller when the GBP      |
134 |             |               |            | features are installed. It       |
135 |             |               |            | integrates some test suites from |
136 |             |               |            | upstream using Robot as the test |
137 |             |               |            | framework                        |
138 +-------------+---------------+------------+----------------------------------+
139 | VNF         | vnf           | cloudify   | Example of a real VNF deployment |
140 |             |               | \_ims      | to show the NFV capabilities of  |
141 |             |               |            | the platform. The IP Multimedia  |
142 |             |               |            | Subsytem is a typical Telco test |
143 |             |               |            | case, referenced by ETSI.        |
144 |             |               |            | It provides a fully functional   |
145 |             |               |            | VoIP System                      |
146 |             |               +------------+----------------------------------+
147 |             |               | vyos       | vRouter testing                  |
148 |             |               | \_vrouter  |                                  |
149 |             |               +------------+----------------------------------+
150 |             |               | juju_epc   | vEPC validation with Juju as VNF |
151 |             |               |            | manager and ABoT as test executor|
152 |             |               +------------+----------------------------------+
153 |             |               | cloudify   | Based on cloudify_ims test case  |
154 |             |               | \_ims_perf | cloudify_ims_perf substitutes    |
155 |             |               |            | the signaling test suite by an   |
156 |             |               |            | automatic deployment of an Ixia  |
157 |             |               |            | loader and generic SIP stress    |
158 |             |               |            | tests.                           |
159 |             |               |            | This work has been initiated     |
160 |             |               |            | during the plugfest and allows   |
161 |             |               |            | realistic load tests on top of   |
162 |             |               |            | cloudify_ims. Please note that   |
163 |             |               |            | this test is available but not   |
164 |             |               |            | declared in testcases.yaml as it |
165 |             |               |            | requires access to proprietary   |
166 |             |               |            | resources (Ixia loader)          |
167 +-------------+---------------+------------+----------------------------------+
168 | Kubernetes  | healthcheck   | k8s_smoke  | Test a running Kubernetes        |
169 |             |               |            | cluster and ensure it satisfies  |
170 |             |               |            | minimal functional requirements  |
171 |             +---------------+------------+----------------------------------+
172 |             | smoke         | k8s\_      | Run a subset of Kubernetes       |
173 |             |               | conformance| End-to-End tests, expected to    |
174 |             |               |            | pass on any Kubernetes cluster   |
175 |             +---------------+------------+----------------------------------+
176 |             | stor4nfv      | stor4nfv   | Run tests necessary to           |
177 |             |               | \_k8s      | demonstrate conformance of the   |
178 |             |               |            | K8s+Stor4NFV deployment          |
179 |             +---------------+------------+----------------------------------+
180 |             | clover        | clover_k8s | Test functionality of            |
181 |             |               |            | K8s+Istio+Clover deployment.     |
182 +-------------+---------------+------------+----------------------------------+
183
184
185 As shown in the above table, Functest is structured into different 'domains',
186 'tiers' and 'test cases'. Each 'test case' usually represents an actual
187 'Test Suite' comprised -in turn- of several test cases internally.
188
189 Test cases also have an implicit execution order. For example, if the early
190 'healthcheck' Tier testcase fails, or if there are any failures in the 'smoke'
191 Tier testcases, there is little point to launch a full testcase execution
192 round.
193
194 In Danube, we merged smoke and sdn controller tiers in smoke tier.
195
196 An overview of the Functest Structural Concept is depicted graphically below:
197
198 .. figure:: ../../../images/concepts_mapping_fraser.png
199    :align: center
200    :alt: Functest Concepts Structure
201
202 Some of the test cases are developed by Functest team members, whereas others
203 are integrated from upstream communities or other OPNFV projects. For example,
204 `Tempest <http://docs.openstack.org/developer/tempest/overview.html>`_ is the
205 OpenStack integration test suite and Functest is in charge of the selection,
206 integration and automation of those tests that fit suitably to OPNFV.
207
208 The Tempest test suite is the default OpenStack smoke test suite but no new
209 test cases have been created in OPNFV Functest.
210
211 The results produced by the tests run from CI are pushed and collected into a
212 NoSQL database. The goal is to populate the database with results from
213 different sources and scenarios and to show them on a `Functest Dashboard`_. A
214 screenshot of a live Functest Dashboard is shown below:
215
216 .. figure:: ../../../images/FunctestDashboardEuphrates.png
217    :align: center
218    :alt: Functest Dashboard
219
220
221 Basic components (VIM, SDN controllers) are tested through their own suites.
222 Feature projects also provide their own test suites with different ways of
223 running their tests.
224
225 The notion of domain has been introduced in the description of the test cases
226 stored in the Database.
227 This parameters as well as possible tags can be used for the Test case catalog.
228
229 vIMS test case was integrated to demonstrate the capability to deploy a
230 relatively complex NFV scenario on top of the OPNFV infrastructure.
231
232 Functest considers OPNFV as a black box. OPNFV offers a lot of potential
233 combinations (which may change from one version to another):
234
235   * 3 controllers (OpenDaylight, ONOS, OpenContrail)
236   * 5 installers (Apex, Compass, Daisy, Fuel, Joid)
237
238 Most of the tests are runnable by any combination, but some tests might have
239 restrictions imposed by the utilized installers or due to the available
240 deployed features. The system uses the environment variables (INSTALLER_TYPE
241 and DEPLOY_SCENARIO) to automatically determine the valid test cases, for each
242 given environment.
243
244 A convenience Functest CLI utility is also available to simplify setting up the
245 Functest evironment, management of the OpenStack environment (e.g. resource
246 clean-up) and for executing tests.
247 The Functest CLI organised the testcase into logical Tiers, which contain in
248 turn one or more testcases. The CLI allows execution of a single specified
249 testcase, all test cases in a specified Tier, or the special case of execution
250 of **ALL** testcases. The Functest CLI is introduced in more details in next
251 section.
252
253 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
254 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
255 .. _`Doctor User Guide`: http://artifacts.opnfv.org/doctor/colorado/userguide/index.html
256 .. _`SDNVPN User Guide`: http://artifacts.opnfv.org/sdnvpn/colorado/docs/userguide/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