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