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