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