309d6268cf53cdea4de686b1eed84cb36bb15237
[opnfvdocs.git] / docs / testing / ecosystem / overview.rst
1 .. _testing_overview:
2
3 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
4 .. SPDX-License-Identifier: CC-BY-4.0
5
6 ======================
7 OPNFV Testing Overview
8 ======================
9
10 Introduction
11 ============
12
13 Testing is one of the key activities in OPNFV and includes unit, feature,
14 component, system level testing for development, automated deployment,
15 performance characterization and stress testing.
16
17 Test projects are dedicated to provide frameworks, tooling and test-cases categorized as
18 functional, performance or compliance testing. Test projects fulfill different roles such as
19 verifying VIM functionality, benchmarking components and platforms or analysis of measured
20 KPIs for OPNFV release scenarios.
21
22 Feature projects also provide their own test suites that either run independently or within a
23 test project.
24
25 This document details the OPNFV testing ecosystem, describes common test components used
26 by individual OPNFV projects and provides links to project specific documentation.
27
28
29 The OPNFV Testing Ecosystem
30 ===========================
31
32 The OPNFV testing projects are represented in the following diagram:
33
34 .. figure:: ../../images/OPNFV_testing_working_group.png
35    :align: center
36    :alt: Overview of OPNFV Testing projects
37
38 The major testing projects are described in the table below:
39
40 +----------------+---------------------------------------------------------+
41 |  Project       |   Description                                           |
42 +================+=========================================================+
43 | Bottlenecks    | This project aims to find system bottlenecks by testing |
44 |                | and verifying OPNFV infrastructure in a staging         |
45 |                | environment before committing it to a production        |
46 |                | environment. Instead of debugging a deployment in       |
47 |                | production environment, an automatic method for         |
48 |                | executing benchmarks which plans to validate the        |
49 |                | deployment during staging is adopted. This project      |
50 |                | forms a staging framework to find bottlenecks and to do |
51 |                | analysis of the OPNFV infrastructure.                   |
52 +----------------+---------------------------------------------------------+
53 | CPerf          | SDN Controller benchmarks and performance testing,      |
54 |                | applicable to controllers in general. Collaboration of  |
55 |                | upstream controller testing experts, external test tool |
56 |                | developers and the standards community. Primarily       |
57 |                | contribute to upstream/external tooling, then add jobs  |
58 |                | to run those tools on OPNFV's infrastructure.           |
59 +----------------+---------------------------------------------------------+
60 | Dovetail       | This project intends to define and provide a set of     |
61 |                | OPNFV related validation criteria/tests that will       |
62 |                | provide input for the OPNFV Complaince Verification     |
63 |                | Program.  The Dovetail project is executed with the     |
64 |                | guidance and oversight of the Complaince and            |
65 |                | Certification (C&C) committee and work to secure the    |
66 |                | goals of the C&C committee for each release. The        |
67 |                | project intends to incrementally define qualification   |
68 |                | criteria that establish the foundations of how one is   |
69 |                | able to measure the ability to utilize the OPNFV        |
70 |                | platform, how the platform itself should behave, and    |
71 |                | how applications may be deployed on the platform.       |
72 +----------------+---------------------------------------------------------+
73 | Functest       | This project deals with the functional testing of the   |
74 |                | VIM and NFVI. It leverages several upstream test suites |
75 |                | (OpenStack, ODL, ONOS, etc.) and can be used by feature |
76 |                | project to launch feature test suites in CI/CD.         |
77 |                | The project is used for scenario validation.            |
78 +----------------+---------------------------------------------------------+
79 | NFVbench       | NFVbench is a compact and self contained data plane     |
80 |                | performance measurement tool for OpensStack based NFVi  |
81 |                | platforms. It is agnostic of the NFVi distribution,     |
82 |                | Neutron networking implementation and hardware.         |
83 |                | It runs on any Linux server with a DPDK compliant       |
84 |                | NIC connected to the NFVi platform data plane and       |
85 |                | bundles a highly efficient software traffic generator.  |
86 |                | Provides a fully automated measurement of most common   |
87 |                | packet paths at any level of scale and load using       |
88 |                | RFC-2544. Available as a Docker container with simple   |
89 |                | command line and REST interfaces.                       |
90 |                | Easy to use as it takes care of most of the guesswork   |
91 |                | generally associated to data plane benchmarking.        |
92 |                | Can run in any lab or in production environments.       |
93 +----------------+---------------------------------------------------------+
94 | QTIP           | QTIP as the project for "Platform Performance           |
95 |                | Benchmarking" in OPNFV aims to provide user a simple    |
96 |                | indicator for performance, supported by comprehensive   |
97 |                | testing data and transparent calculation formula.       |
98 |                | It provides a platform with common services for         |
99 |                | performance benchmarking which helps users to build     |
100 |                | indicators by themselves with ease.                     |
101 +----------------+---------------------------------------------------------+
102 | StorPerf       | The purpose of this project is to provide a tool to     |
103 |                | measure block and object storage performance in an NFVI.|
104 |                | When complemented with a characterization of typical VF |
105 |                | storage performance requirements, it can provide        |
106 |                | pass/fail thresholds for test, staging, and production  |
107 |                | NFVI environments.                                      |
108 +----------------+---------------------------------------------------------+
109 | VSPERF         | VSPERF is an OPNFV project that provides an automated   |
110 |                | test-framework and comprehensive test suite based on    |
111 |                | Industry Test Specifications for measuring NFVI         |
112 |                | data-plane performance. The data-path includes switching|
113 |                | technologies with physical and virtual network          |
114 |                | interfaces. The VSPERF architecture is switch and       |
115 |                | traffic generator agnostic and test cases can be easily |
116 |                | customized. Software versions and configurations        |
117 |                | including the vSwitch (OVS or VPP) as well as the       |
118 |                | network topology are controlled by VSPERF (independent  |
119 |                | of OpenStack). VSPERF is used as a development tool for |
120 |                | optimizing switching technologies, qualification of     |
121 |                | packet processing components and for pre-deployment     |
122 |                | evaluation of the NFV platform data-path.               |
123 +----------------+---------------------------------------------------------+
124 | Yardstick      | The goal of the Project is to verify the infrastructure |
125 |                | compliance when running VNF applications. NFV Use Cases |
126 |                | described in ETSI GS NFV 001 show a large variety of    |
127 |                | applications, each defining specific requirements and   |
128 |                | complex configuration on the underlying infrastructure  |
129 |                | and test tools.The Yardstick concept decomposes typical |
130 |                | VNF work-load performance metrics into a number of      |
131 |                | characteristics/performance vectors, which each of them |
132 |                | can be represented by distinct test-cases.              |
133 +----------------+---------------------------------------------------------+
134
135
136 ===============================
137 Testing Working Group Resources
138 ===============================
139
140 Test Results Collection Framework
141 =================================
142
143 Any test project running in the global OPNFV lab infrastructure and is
144 integrated with OPNFV CI can push test results to the community Test Database
145 using a common Test API. This database can be used to track the evolution of
146 testing and analyse test runs to compare results across installers, scenarios
147 and between technically and geographically diverse hardware environments.
148
149 Results from the databse are used to generate a dashboard with the current test
150 status for each testing project. Please note that you can also deploy the Test
151 Database and Test API locally in your own environment.
152
153 Overall Test Architecture
154 -------------------------
155
156 The management of test results can be summarized as follows::
157
158   +-------------+    +-------------+    +-------------+
159   |             |    |             |    |             |
160   |   Test      |    |   Test      |    |   Test      |
161   | Project #1  |    | Project #2  |    | Project #N  |
162   |             |    |             |    |             |
163   +-------------+    +-------------+    +-------------+
164            |               |               |
165            V               V               V
166        +---------------------------------------------+
167        |                                             |
168        |           Test Rest API front end           |
169        |    http://testresults.opnfv.org/test        |
170        |                                             |
171        +---------------------------------------------+
172            ^                |                     ^
173            |                V                     |
174            |     +-------------------------+      |
175            |     |                         |      |
176            |     |    Test Results DB      |      |
177            |     |         Mongo DB        |      |
178            |     |                         |      |
179            |     +-------------------------+      |
180            |                                      |
181            |                                      |
182      +----------------------+        +----------------------+
183      |                      |        |                      |
184      | Testing Dashboards   |        |  Test Landing page   |
185      |                      |        |                      |
186      +----------------------+        +----------------------+
187
188
189 The Test Database
190 -----------------
191 A Mongo DB Database was introduced for the Brahmaputra release.
192 The following collections are declared in this database:
193
194 * pods: the list of pods used for production CI
195 * projects: the list of projects providing test cases
196 * test cases: the test cases related to a given project
197 * results: the results of the test cases
198 * scenarios: the OPNFV scenarios tested in CI
199
200 This database can be used by any project through the Test API.
201 Please note that projects may also use additional databases. The Test
202 Database is mainly use to collect CI test results and generate scenario
203 trust indicators. The Test Database is also cloned for OPNFV Plugfests in
204 order to provide a private datastore only accessible to Plugfest participants.
205
206
207 Test API description
208 --------------------
209 The Test API is used to declare pods, projects, test cases and test results.
210 Pods correspond to a cluster of machines (3 controller and 2 compute nodes in
211 HA mode) used to run the tests and are defined in the Pharos project.
212 The results pushed in the database are related to pods, projects and test cases.
213 Trying to push results generated from a non-referenced pod will return an error
214 message by the Test API.
215
216 The data model is very basic, 5 objects are available:
217   * Pods
218   * Projects
219   * Test cases
220   * Results
221   * Scenarios
222
223 For detailed information, please go to http://artifacts.opnfv.org/releng/docs/testapi.html
224
225 The code of the Test API is hosted in the releng-testresults repository `[TST2]`_.
226 The static documentation of the Test API can be found at `[TST3]`_.
227 The Test API has been dockerized and may be installed locally in your lab.
228
229 The deployment of the Test API has been automated.
230 A jenkins job manages:
231
232   * the unit tests of the Test API
233   * the creation of a new docker file
234   * the deployment of the new Test API
235   * the archive of the old Test API
236   * the backup of the Mongo DB
237
238 Test API Authorization
239 ----------------------
240
241 PUT/DELETE/POST operations of the TestAPI now require token based authorization. The token needs
242 to be added in the request using a header 'X-Auth-Token' for access to the database.
243
244 e.g::
245
246     headers['X-Auth-Token']
247
248 The value of the header i.e the token can be accessed in the jenkins environment variable
249 *TestApiToken*. The token value is added as a masked password.
250
251 .. code-block:: python
252
253     headers['X-Auth-Token'] = os.environ.get('TestApiToken')
254
255 The above example is in Python. Token based authentication has been added so
256 that only CI pods running Jenkins jobs can access the database. Please note
257 that currently token authorization is implemented but is not yet enabled.
258
259
260 Test Project Reporting
261 ======================
262 The reporting page for the test projects is http://testresults.opnfv.org/reporting/
263
264 .. figure:: ../../images/reporting_page.png
265    :align: center
266    :alt: Testing group reporting page
267
268 This page provides reporting per OPNFV release and per testing project.
269
270 .. figure:: ../../images/reportingMaster.png
271    :align: center
272    :alt: Testing group Euphrates reporting page
273
274 An evolution of the reporting page is planned to unify test reporting by creating
275 a landing page that shows the scenario status in one glance (this information was
276 previously consolidated manually on a wiki page). The landing page will be displayed
277 per scenario and show:
278
279  * the status of the deployment
280  * the score from each test suite. There is no overall score, it is determined
281    by each test project.
282  * a trust indicator
283
284
285 Test Case Catalog
286 =================
287 Until the Colorado release, each testing project managed the list of its
288 test cases. This made it very hard to have a global view of the available test
289 cases from the different test projects. A common view was possible through the API
290 but it was not very user friendly.
291 Test cases per project may be listed by calling:
292
293  http://testresults.opnfv.org/test/api/v1/projects/<project_name>/cases
294
295 with project_name: bottlenecks, functest, qtip, storperf, vsperf, yardstick
296
297 A test case catalog has now been realized `[TST4]`_. Roll over the project then
298 click to get the list of test cases, and then click on the case to get more details.
299
300 .. figure:: ../../images/TestcaseCatalog.png
301    :align: center
302    :alt: Testing group testcase catalog
303
304 Test Dashboards
305 ===============
306
307 The Test Dashboard is used to provide a consistent view of the results collected in CI.
308 The results shown on the dashboard are post processed from the Database, which only
309 contains raw results.
310 The dashboard can be used in addition to the reporting page (high level view) to allow
311 the creation of specific graphs according to what the test owner wants to show.
312
313 In Brahmaputra, a basic dashboard was created in Functest.
314 In Colorado, Yardstick used Grafana (time based graphs) and ELK (complex
315 graphs).
316 Since Danube, the OPNFV testing community decided to adopt the ELK framework and to
317 use Bitergia for creating highly flexible dashboards `[TST5]`_.
318
319 .. figure:: ../../images/DashboardBitergia.png
320    :align: center
321    :alt: Testing group testcase catalog
322
323
324 .. include:: ./energy-monitoring.rst
325
326
327 OPNFV Test Group Information
328 ============================
329
330 For more information or to participate in the OPNFV test community please see the
331 following:
332
333 wiki: https://wiki.opnfv.org/testing
334
335 mailing list: test-wg@lists.opnfv.org
336
337 IRC channel: #opnfv-testperf
338
339 weekly meeting (https://wiki.opnfv.org/display/meetings/TestPerf):
340  * Usual time: Every Thursday 15:00-16:00 UTC / 7:00-8:00 PST
341
342 =======================
343 Reference Documentation
344 =======================
345
346 +----------------+---------------------------------------------------------+
347 |  Project       |   Documentation links                                   |
348 +================+=========================================================+
349 | Bottlenecks    | https://wiki.opnfv.org/display/bottlenecks/Bottlenecks  |
350 +----------------+---------------------------------------------------------+
351 | CPerf          | https://wiki.opnfv.org/display/cperf                    |
352 +----------------+---------------------------------------------------------+
353 | Dovetail       | https://wiki.opnfv.org/display/dovetail                 |
354 +----------------+---------------------------------------------------------+
355 | Functest       | https://wiki.opnfv.org/display/functest/                |
356 +----------------+---------------------------------------------------------+
357 | NFVbench       | https://wiki.opnfv.org/display/nfvbench/                |
358 +----------------+---------------------------------------------------------+
359 | QTIP           | https://wiki.opnfv.org/display/qtip                     |
360 +----------------+---------------------------------------------------------+
361 | StorPerf       | https://wiki.opnfv.org/display/storperf/Storperf        |
362 +----------------+---------------------------------------------------------+
363 | VSPERF         | https://wiki.opnfv.org/display/vsperf                   |
364 +----------------+---------------------------------------------------------+
365 | Yardstick      | https://wiki.opnfv.org/display/yardstick/Yardstick      |
366 +----------------+---------------------------------------------------------+
367
368
369 `[TST1]`_: OPNFV web site
370
371 `[TST2]`_: TestAPI code repository link in releng-testresults
372
373 `[TST3]`_: TestAPI autogenerated documentation
374
375 `[TST4]`_: Testcase catalog
376
377 `[TST5]`_: Testing group dashboard
378
379 .. _`[TST1]`: http://www.opnfv.org
380 .. _`[TST2]`: https://git.opnfv.org/releng-testresults
381 .. _`[TST3]`: http://artifacts.opnfv.org/releng/docs/testapi.html
382 .. _`[TST4]`: http://testresults.opnfv.org/testing/index.html#!/select/visual
383 .. _`[TST5]`: https://opnfv.biterg.io:443/goto/283dba93ca18e95964f852c63af1d1ba