Merge "Refactor tempest common"
[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 |             |               |            | 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   | Validates deployment of a complex|
151 |             |               |            | mobility VNF on OPNFV Platform.  |
152 |             |               |            | Uses Juju for deploying the OAI  |
153 |             |               |            | EPC  and ABot for defining test  |
154 |             |               |            | scenarios using high-level DSL.  |
155 |             |               |            | VNF tests reference 3GPP         |
156 |             |               |            | Technical Specs and are executed |
157 |             |               |            | through protocol drivers provided|
158 |             |               |            | by ABot.                         |
159 +-------------+---------------+------------+----------------------------------+
160 | Kubernetes  | healthcheck   | k8s_smoke  | Test a running Kubernetes        |
161 |             |               |            | cluster and ensure it satisfies  |
162 |             |               |            | minimal functional requirements  |
163 |             +---------------+------------+----------------------------------+
164 |             | smoke         | k8s\_      | Run a subset of Kubernetes       |
165 |             |               | conformance| End-to-End tests, expected to    |
166 |             |               |            | pass on any Kubernetes cluster   |
167 |             +---------------+------------+----------------------------------+
168 |             | stor4nfv      | stor4nfv   | Run tests necessary to           |
169 |             |               | \_k8s      | demonstrate conformance of the   |
170 |             |               |            | K8s+Stor4NFV deployment          |
171 |             +---------------+------------+----------------------------------+
172 |             | clover        | clover_k8s | Test functionality of            |
173 |             |               |            | K8s+Istio+Clover deployment.     |
174 +-------------+---------------+------------+----------------------------------+
175
176
177 As shown in the above table, Functest is structured into different 'domains',
178 'tiers' and 'test cases'. Each 'test case' usually represents an actual
179 'Test Suite' comprised -in turn- of several test cases internally.
180
181 Test cases also have an implicit execution order. For example, if the early
182 'healthcheck' Tier testcase fails, or if there are any failures in the 'smoke'
183 Tier testcases, there is little point to launch a full testcase execution
184 round.
185
186 In Danube, we merged smoke and sdn controller tiers in smoke tier.
187
188 An overview of the Functest Structural Concept is depicted graphically below:
189
190 .. figure:: ../../../images/concepts_mapping_fraser.png
191    :align: center
192    :alt: Functest Concepts Structure
193
194 Some of the test cases are developed by Functest team members, whereas others
195 are integrated from upstream communities or other OPNFV projects. For example,
196 `Tempest <http://docs.openstack.org/developer/tempest/overview.html>`_ is the
197 OpenStack integration test suite and Functest is in charge of the selection,
198 integration and automation of those tests that fit suitably to OPNFV.
199
200 The Tempest test suite is the default OpenStack smoke test suite but no new
201 test cases have been created in OPNFV Functest.
202
203 The results produced by the tests run from CI are pushed and collected into a
204 NoSQL database. The goal is to populate the database with results from
205 different sources and scenarios and to show them on a `Functest Dashboard`_. A
206 screenshot of a live Functest Dashboard is shown below:
207
208 .. figure:: ../../../images/FunctestDashboardEuphrates.png
209    :align: center
210    :alt: Functest Dashboard
211
212
213 Basic components (VIM, SDN controllers) are tested through their own suites.
214 Feature projects also provide their own test suites with different ways of
215 running their tests.
216
217 The notion of domain has been introduced in the description of the test cases
218 stored in the Database.
219 This parameters as well as possible tags can be used for the Test case catalog.
220
221 vIMS test case was integrated to demonstrate the capability to deploy a
222 relatively complex NFV scenario on top of the OPNFV infrastructure.
223
224 Functest considers OPNFV as a black box. OPNFV offers a lot of potential
225 combinations (which may change from one version to another):
226
227   * 3 controllers (OpenDaylight, ONOS, OpenContrail)
228   * 5 installers (Apex, Compass, Daisy, Fuel, Joid)
229
230 Most of the tests are runnable by any combination, but some tests might have
231 restrictions imposed by the utilized installers or due to the available
232 deployed features. The system uses the environment variables (INSTALLER_TYPE
233 and DEPLOY_SCENARIO) to automatically determine the valid test cases, for each
234 given environment.
235
236 A convenience Functest CLI utility is also available to simplify setting up the
237 Functest evironment, management of the OpenStack environment (e.g. resource
238 clean-up) and for executing tests.
239 The Functest CLI organised the testcase into logical Tiers, which contain in
240 turn one or more testcases. The CLI allows execution of a single specified
241 testcase, all test cases in a specified Tier, or the special case of execution
242 of **ALL** testcases. The Functest CLI is introduced in more details in next
243 section.
244
245 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
246 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
247 .. _`Doctor User Guide`: http://artifacts.opnfv.org/doctor/colorado/userguide/index.html
248 .. _`SDNVPN User Guide`: http://artifacts.opnfv.org/sdnvpn/colorado/docs/userguide/index.html
249 .. _`Parser User Guide`: http://artifacts.opnfv.org/parser/colorado/docs/userguide/index.html
250 .. _`Functest Dashboard`: http://testresults.opnfv.org/kibana_dashboards/
251 .. _`SFC User Guide`: http://artifacts.opnfv.org/sfc/colorado/userguide/index.html