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