3 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
4 .. SPDX-License-Identifier: CC-BY-4.0
7 Anuket Testing Overview
13 Testing is one of the key activities in Anuket and includes unit, feature,
14 component, system level testing for development, automated deployment,
15 performance characterization and stress testing.
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 Anuket release scenarios.
22 Feature projects also provide their own test suites that either run independently or within a
25 This document details the Anuket testing ecosystem, describes common test components used
26 by individual Anuket projects and provides links to project specific documentation.
29 The Anuket Testing Ecosystem
30 ===========================
32 The Anuket testing projects are represented in the following diagram:
34 .. figure:: ../../images/OPNFV_testing_working_group.png
36 :alt: Overview of Anuket Testing projects
38 The major testing projects are described in the table below:
40 +----------------+---------------------------------------------------------+
41 | Project | Description |
42 +================+=========================================================+
43 | Functest | This project deals with the functional testing of the |
44 | | VIM and NFVI. It leverages several upstream test suites |
45 | | (OpenStack, ODL, ONOS, etc.) and can be used by feature |
46 | | project to launch feature test suites in CI/CD. |
47 | | The project is used for scenario validation. |
48 +----------------+---------------------------------------------------------+
49 | ViNePerf | ViNePerf provides an automated test-framework and |
50 | | comprehensive test suite based on industry standards for|
51 | | measuring the data-plane performance in different cloud |
52 | | environments. Dataplane in a cloud includes different |
53 | | switching technologies with physical and virtual network|
54 | | interfaces, and carries traffic to and from workloads |
55 | | running as virtual-machines and containers. The |
56 | | architecture of ViNePerf is agnostic of cloud-type, |
57 | | switching-technology, and traffic-generator. ViNePerf |
58 | | allows user to customize the test-cases, |
59 | | network-topology, workload-deployment, hardware- |
60 | | configuration, and the versions of the software |
61 | | components such vswitch, vnf, cnf, cni, etc. ViNePerf |
62 | | can be used both pre-deployment and post-deployment of |
63 | | the cloud. Though ViNePerf architecture is designed for |
64 | | evaluation of dataplane of clouds in Lab environments, |
65 | | it can also be in production clouds. ViNePerf methods |
66 | | follows standards developed by the IETF and ETSI NFV, |
67 | | and contribute to the development of new standards. |
68 +----------------+---------------------------------------------------------+
71 ===============================
72 Testing Working Group Resources
73 ===============================
75 Test Results Collection Framework
76 =================================
78 Any test project running in the global Anuket lab infrastructure and is
79 integrated with Anuket CI can push test results to the community Test Database
80 using a common Test API. This database can be used to track the evolution of
81 testing and analyse test runs to compare results across installers, scenarios
82 and between technically and geographically diverse hardware environments.
84 Results from the databse are used to generate a dashboard with the current test
85 status for each testing project. Please note that you can also deploy the Test
86 Database and Test API locally in your own environment.
88 Overall Test Architecture
89 -------------------------
91 The management of test results can be summarized as follows::
93 +-------------+ +-------------+ +-------------+
95 | Test | | Test | | Test |
96 | Project #1 | | Project #2 | | Project #N |
98 +-------------+ +-------------+ +-------------+
101 +---------------------------------------------+
103 | Test Rest API front end |
104 | http://testresults.opnfv.org/test |
106 +---------------------------------------------+
109 | +-------------------------+ |
111 | | Test Results DB | |
114 | +-------------------------+ |
117 +----------------------+ +----------------------+
119 | Testing Dashboards | | Test Landing page |
121 +----------------------+ +----------------------+
126 A Mongo DB Database was introduced for the Brahmaputra release.
127 The following collections are declared in this database:
129 * pods: the list of pods used for production CI
130 * projects: the list of projects providing test cases
131 * test cases: the test cases related to a given project
132 * results: the results of the test cases
133 * scenarios: the Anuket scenarios tested in CI
135 This database can be used by any project through the Test API.
136 Please note that projects may also use additional databases. The Test
137 Database is mainly use to collect CI test results and generate scenario
138 trust indicators. The Test Database is also cloned for Anuket Plugfests in
139 order to provide a private datastore only accessible to Plugfest participants.
144 The Test API is used to declare pods, projects, test cases and test results.
145 Pods correspond to a cluster of machines (3 controller and 2 compute nodes in
146 HA mode) used to run the tests and are defined in the Pharos project.
147 The results pushed in the database are related to pods, projects and test cases.
148 Trying to push results generated from a non-referenced pod will return an error
149 message by the Test API.
151 The data model is very basic, 5 objects are available:
158 For detailed information, please go to http://artifacts.opnfv.org/releng/docs/testapi.html
160 The code of the Test API is hosted in the releng-testresults repository `[TST2]`_.
161 The static documentation of the Test API can be found at `[TST3]`_.
162 The Test API has been dockerized and may be installed locally in your lab.
164 The deployment of the Test API has been automated.
165 A jenkins job manages:
167 * the unit tests of the Test API
168 * the creation of a new docker file
169 * the deployment of the new Test API
170 * the archive of the old Test API
171 * the backup of the Mongo DB
173 Test API Authorization
174 ----------------------
176 PUT/DELETE/POST operations of the TestAPI now require token based authorization. The token needs
177 to be added in the request using a header 'X-Auth-Token' for access to the database.
181 headers['X-Auth-Token']
183 The value of the header i.e the token can be accessed in the jenkins environment variable
184 *TestApiToken*. The token value is added as a masked password.
186 .. code-block:: python
188 headers['X-Auth-Token'] = os.environ.get('TestApiToken')
190 The above example is in Python. Token based authentication has been added so
191 that only CI pods running Jenkins jobs can access the database. Please note
192 that currently token authorization is implemented but is not yet enabled.
195 Test Project Reporting
196 ======================
197 The reporting page for the test projects is http://testresults.opnfv.org/reporting/
199 .. figure:: ../../images/reporting_page.png
201 :alt: Testing group reporting page
203 This page provides reporting per Anuket release and per testing project.
205 .. figure:: ../../images/reportingMaster.png
207 :alt: Testing group Euphrates reporting page
209 An evolution of the reporting page is planned to unify test reporting by creating
210 a landing page that shows the scenario status in one glance (this information was
211 previously consolidated manually on a wiki page). The landing page will be displayed
212 per scenario and show:
214 * the status of the deployment
215 * the score from each test suite. There is no overall score, it is determined
216 by each test project.
222 Until the Colorado release, each testing project managed the list of its
223 test cases. This made it very hard to have a global view of the available test
224 cases from the different test projects. A common view was possible through the API
225 but it was not very user friendly.
226 Test cases per project may be listed by calling:
228 http://testresults.opnfv.org/test/api/v1/projects/<project_name>/cases
230 with project_name: bottlenecks, functest, qtip, storperf, vsperf, yardstick
232 A test case catalog has now been realized `[TST4]`_. Roll over the project then
233 click to get the list of test cases, and then click on the case to get more details.
235 .. figure:: ../../images/TestcaseCatalog.png
237 :alt: Testing group testcase catalog
242 The Test Dashboard is used to provide a consistent view of the results collected in CI.
243 The results shown on the dashboard are post processed from the Database, which only
244 contains raw results.
245 The dashboard can be used in addition to the reporting page (high level view) to allow
246 the creation of specific graphs according to what the test owner wants to show.
249 =======================
250 Reference Documentation
251 =======================
254 `[TST1]`_: Anuket web site
256 `[TST2]`_: TestAPI code repository link in releng-testresults
258 `[TST3]`_: TestAPI autogenerated documentation
260 `[TST4]`_: Testcase catalog
262 .. _`[TST1]`: http://www.anuket.org
263 .. _`[TST2]`: https://git.opnfv.org/releng-testresults
264 .. _`[TST3]`: http://artifacts.opnfv.org/releng/docs/testapi.html
265 .. _`[TST4]`: http://testresults.opnfv.org/testing/index.html#!/select/visual