Merge "Put vnf_test pass if more than 80% of vnf test result are OK"
[functest.git] / docs / testing / user / userguide / test_overview.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 |             |               | odl_netvirt    | Test Suite for the OpenDaylight  |
90 |             |               |                | SDN Controller when the NetVirt  |
91 |             |               |                | features are installed. It       |
92 |             |               |                | integrates some test suites from |
93 |             |               |                | upstream using Robot as the test |
94 |             |               |                | framework                        |
95 |             |               +----------------+----------------------------------+
96 |             |               | fds            | Test Suite for the OpenDaylight  |
97 |             |               |                | SDN Controller when the GBP      |
98 |             |               |                | features are installed. It       |
99 |             |               |                | integrates some test suites from |
100 |             |               |                | upstream using Robot as the test |
101 |             |               |                | framework                        |
102 +-------------+---------------+----------------+----------------------------------+
103 | Features    | features      | bgpvpn         | Implementation of the OpenStack  |
104 |             |               |                | bgpvpn API from the SDNVPN       |
105 |             |               |                | feature project. It allows for   |
106 |             |               |                | the creation of BGP VPNs.        |
107 |             |               |                | See `SDNVPN User Guide`_ for     |
108 |             |               |                | details                          |
109 |             |               +----------------+----------------------------------+
110 |             |               | doctor         | Doctor platform, as of Colorado  |
111 |             |               |                | release, provides the three      |
112 |             |               |                | features:                        |
113 |             |               |                | * Immediate Notification         |
114 |             |               |                | * Consistent resource state      |
115 |             |               |                | awareness for compute host down  |
116 |             |               |                | * Valid compute host status      |
117 |             |               |                | given to VM owner                |
118 |             |               |                | See `Doctor User Guide`_ for     |
119 |             |               |                | details                          |
120 |             |               +----------------+----------------------------------+
121 |             |               | domino         | Domino provides TOSCA template   |
122 |             |               |                | distribution service for network |
123 |             |               |                | service and VNF descriptors      |
124 |             |               |                | among MANO components e.g.,      |
125 |             |               |                | NFVO, VNFM, VIM, SDN-C, etc.,    |
126 |             |               |                | as well as OSS/BSS functions.    |
127 |             |               |                | See `Domino User Guide`_ for     |
128 |             |               |                | details                          |
129 |             |               +----------------+----------------------------------+
130 |             |               | odl-sfc        | SFC testing for odl scenarios    |
131 |             |               |                | See `SFC User Guide`_ for details|
132 |             |               +----------------+----------------------------------+
133 |             |               | parser         | Parser is an integration project |
134 |             |               |                | which aims to provide            |
135 |             |               |                | placement/deployment templates   |
136 |             |               |                | translation for OPNFV platform,  |
137 |             |               |                | including TOSCA -> HOT, POLICY ->|
138 |             |               |                | TOSCA and YANG -> TOSCA. it      |
139 |             |               |                | deals with a fake vRNC.          |
140 |             |               |                | See `Parser User Guide`_ for     |
141 |             |               |                | details                          |
142 |             |               +----------------+----------------------------------+
143 |             |               | promise        | Resource reservation and         |
144 |             |               |                | management project to identify   |
145 |             |               |                | NFV related requirements and     |
146 |             |               |                | realize resource reservation for |
147 |             |               |                | future usage by capacity         |
148 |             |               |                | management of resource pools     |
149 |             |               |                | regarding compute, network and   |
150 |             |               |                | storage.                         |
151 |             |               |                | See `Promise User Guide`_ for    |
152 |             |               |                | details.                         |
153 +-------------+---------------+----------------+----------------------------------+
154 | VNF         | vnf           | cloudify_ims   | Example of a real VNF deployment |
155 |             |               |                | to show the NFV capabilities of  |
156 |             |               |                | the platform. The IP Multimedia  |
157 |             |               |                | Subsytem is a typical Telco test |
158 |             |               |                | case, referenced by ETSI.        |
159 |             |               |                | It provides a fully functional   |
160 |             |               |                | VoIP System                      |
161 |             |               +----------------+----------------------------------+
162 |             |               | orchestra      | OpenIMS deployment using         |
163 |             |               |   openims      | Openbaton orchestrator           |
164 |             |               +----------------+----------------------------------+
165 |             |               | orchestra      | Cleawater IMS deployment using   |
166 |             |               |   cleawaterims | Openbaton orchestrator           |
167 |             |               +----------------+----------------------------------+
168 |             |               | vyos_vrouter   | vRouter testing                  |
169 +-------------+---------------+----------------+----------------------------------+
170
171
172 As shown in the above table, Functest is structured into different 'domains',
173 'tiers' and 'test cases'. Each 'test case' usually represents an actual
174 'Test Suite' comprised -in turn- of several test cases internally.
175
176 Test cases also have an implicit execution order. For example, if the early
177 'healthcheck' Tier testcase fails, or if there are any failures in the 'smoke'
178 Tier testcases, there is little point to launch a full testcase execution round.
179
180 In Danube, we merged smoke and sdn controller tiers in smoke tier.
181
182 An overview of the Functest Structural Concept is depicted graphically below:
183
184 .. figure:: ../../../images/concepts_mapping_final.png
185    :align: center
186    :alt: Functest Concepts Structure
187
188 Some of the test cases are developed by Functest team members, whereas others
189 are integrated from upstream communities or other OPNFV projects. For example,
190 `Tempest <http://docs.openstack.org/developer/tempest/overview.html>`_ is the
191 OpenStack integration test suite and Functest is in charge of the selection,
192 integration and automation of those tests that fit suitably to OPNFV.
193
194 The Tempest test suite is the default OpenStack smoke test suite but no new test
195 cases have been created in OPNFV Functest.
196
197 The results produced by the tests run from CI are pushed and collected into a
198 NoSQL database. The goal is to populate the database with results from different
199 sources and scenarios and to show them on a `Functest Dashboard`_. A screenshot
200 of a live Functest Dashboard is shown below:
201
202 .. figure:: ../../../images/FunctestDashboardDanube.png
203    :align: center
204    :alt: Functest Dashboard
205
206
207 Basic components (VIM, SDN controllers) are tested through their own suites.
208 Feature projects also provide their own test suites with different ways of
209 running their tests.
210
211 The notion of domain has been introduced in the description of the test cases
212 stored in the Database.
213 This parameters as well as possible tags can be used for the Test case catalog.
214
215 vIMS test case was integrated to demonstrate the capability to deploy a
216 relatively complex NFV scenario on top of the OPNFV infrastructure.
217
218 Functest considers OPNFV as a black box. As of Danube release the OPNFV
219 offers a lot of potential combinations:
220
221   * 3 controllers (OpenDaylight, ONOS, OpenContrail)
222   * 5 installers (Apex, Compass, Daisy, Fuel, Joid)
223
224 Most of the tests are runnable by any combination, but some tests might have
225 restrictions imposed by the utilized installers or due to the available
226 deployed features. The system uses the environment variables (INSTALLER_IP and
227 DEPLOY_SCENARIO) to automatically determine the valid test cases, for each given
228 environment.
229
230 A convenience Functest CLI utility is also available to simplify setting up the
231 Functest evironment, management of the OpenStack environment (e.g. resource
232 clean-up) and for executing tests.
233 The Functest CLI organised the testcase into logical Tiers, which contain in
234 turn one or more testcases. The CLI allows execution of a single specified
235 testcase, all test cases in a specified Tier, or the special case of execution
236 of **ALL** testcases. The Functest CLI is introduced in more detail in the
237 section `Executing the functest suites`_ of this document.
238
239 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
240 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
241 .. _`Doctor User Guide`: http://artifacts.opnfv.org/doctor/colorado/userguide/index.html
242 .. _`Promise User Guide`: http://artifacts.opnfv.org/promise/colorado/docs/userguide/index.html
243 .. _`SDNVPN User Guide`: http://artifacts.opnfv.org/sdnvpn/colorado/docs/userguide/index.html
244 .. _`Domino User Guide`: http://artifacts.opnfv.org/domino/docs/userguide-single/index.html
245 .. _`Parser User Guide`: http://artifacts.opnfv.org/parser/colorado/docs/userguide/index.html
246 .. _`Functest Dashboard`: http://testresults.opnfv.org/kibana_dashboards/
247 .. _`SFC User Guide`: http://artifacts.opnfv.org/sfc/colorado/userguide/index.html