summaryrefslogtreecommitdiffstats
path: root/dashboard/Yardstick-Main-1456495795515
blob: d8cac5aa9eb46bf168877c098c7066d10de1478b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
{
  "id": 3,
  "title": "Yardstick-Main",
  "originalTitle": "Yardstick-Main",
  "tags": [],
  "style": "dark",
  "timezone": "browser",
  "editable": true,
  "hideControls": false,
  "sharedCrosshair": false,
  "rows": [
    {
      "collapse": false,
      "editable": true,
      "height": "",
      "panels": [
        {
          "content": "<div class=\"text-center\" style=\"padding: 10px 0 5px 0\">\n<style>\nh1 {\n\ttext-shadow: -1px -1px 1px #fff, 1px 1px 1px #31A7D3;\n\tcolor: #31A7D3;\n\topacity: 0.8;\n\tfont: 80px '31A7D3';\n}\n</style>\n<body>\n\n<h1>Yardstick Dashboard</h1>\n</body>\n<marquee behavior=\"scroll\" bgcolor=\"#424242\" loop=\"-1\" width=\"100%\"><font:80px><a font-family: \"Verdana\" >Results of test cases run on OPNFV labs using Yardstick framework. OPNFV Brahmaputra release.  </marquee>\n",
          "editable": true,
          "error": false,
          "height": "10",
          "id": 4,
          "isNew": true,
          "links": [],
          "mode": "html",
          "span": 12,
          "style": {},
          "title": "",
          "transparent": true,
          "type": "text"
        }
      ],
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "250px",
      "panels": [
        {
          "content": "<br>\n<h3 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"> General Info </a></h3>\n<p>This dashboard contains results of test cases executed in OPNFV community labs, through OPNFV CI, using  <a style=\"color:#31A7D3\"><i><strong> Yardstick </a style></i></strong>\nframework.</p>\n<br>\nThe test cases measure:\n<ul>\n  <li>performance of NFVI</i> in OPNFV community labs</li>\n  <li>performance of NFVI from the perspective of a VTC</li>\n</ul>\n<br>\n<p>For test case data and scenarios overview check the <a style=\"color:#31A7D3\"><strong> Dashboards </a></strong> list.\n<h3 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"> Links </a></h3>\n<ul> \n <li>User Guide <a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/index.html\"> (HTML)</a> <a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/userguide.pdf\">(PDF)</a></li>\n  <li>Framework Code Documentation <a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/apidocs/yardstick.html\"> (HTML)</a>\n<a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/apidocs/apidocs.pdf\"> (PDF)</a></li>\n  <li>Yardstick Brahmaputra release notes<a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/release/index.html\"> (HTML)</a>\n<a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/release/release.pdf\"> (PDF)</a>\n  <li> Yardstick Brahmaputra results report<a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/results/index.html\"> (HTML)</a>\n<a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/results/results.pdf\"> (PDF)\n  <li><a style=\"color:#31A7D3\"; href=\"https://wiki.opnfv.org/yardstick/\"> Yardstick wiki</a></li>\n</ul>\n\n<h3 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"> Feedback </a></h3>\n<p>&#9993; <a href=\"mailto:opnfv-users@lists.opnfv.org\">Contact Yardstick </a></p>\n",
          "editable": true,
          "error": false,
          "id": 2,
          "isNew": true,
          "links": [
            {
              "targetBlank": true,
              "title": "Yardstick wiki",
              "type": "absolute",
              "url": "https://wiki.opnfv.org/yardstick"
            },
            {
              "targetBlank": true,
              "title": "User Guide",
              "type": "absolute",
              "url": "http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/index.html"
            },
            {
              "targetBlank": true,
              "title": "Code pages",
              "type": "absolute",
              "url": "http://artifacts.opnfv.org/yardstick/brahmaputra/docs/apidocs/yardstick.html"
            },
            {
              "dashUri": "db/vtc-dashboard",
              "dashboard": "VTC Dashboard",
              "targetBlank": true,
              "title": "VTC Dashboard",
              "type": "dashboard"
            }
          ],
          "mode": "html",
          "span": 4,
          "style": {},
          "title": "Welcome to Yardstick Dashboard",
          "type": "text"
        },
        {
          "aliasColors": {},
          "bars": false,
          "datasource": "yardstick-vtc",
          "editable": true,
          "error": false,
          "fill": 0,
          "grid": {
            "leftLogBase": 1,
            "leftMax": null,
            "leftMin": null,
            "rightLogBase": 1,
            "rightMax": 200,
            "rightMin": null,
            "threshold1": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2": null,
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "id": 13,
          "isNew": true,
          "leftYAxisLabel": "Packets",
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "show": true,
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null as zero",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "rightYAxisLabel": "Latency",
          "seriesOverrides": [
            {
              "alias": "os-nosdn-nofeature-ha",
              "yaxis": 2
            },
            {
              "alias": "huawei-us-deploy-bare-1 - os-nosdn-nofeature-ha",
              "yaxis": 1
            },
            {
              "alias": "opnfv_yardstick_tc037.mean",
              "yaxis": 2
            },
            {
              "alias": "$tag_pod_name - $tag_deploy_scenario - latency",
              "yaxis": 2
            },
            {
              "alias": "ericsson-pod2 - os-nosdn-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "huawei-us-deploy-bare-1 - os-nosdn-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "ericsson-pod2 - os-odl_l2-bgpvpn-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "huawei-us-deploy-bare-1 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "huawei-us-deploy-bare-1 - os-onos-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "opnfv-jump-1 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "opnfv-jump-2 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "ericsson-pod2 - os-onos-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "ericsson-pod2 - os-odl_l2-sfc-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "orange-fr-pod2 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "ericsson-pod2 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "intel-pod6 - os-nosdn-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "orange-fr-pod2 - os-nosdn-nofeature-ha - latency",
              "yaxis": 2
            },
            {
              "alias": "zte-pod1 - os-odl_l2-nofeature-ha - latency",
              "yaxis": 2
            }
          ],
          "span": 8,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "$tag_pod_name - $tag_deploy_scenario - packets-sent",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "pod_name"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "task_id"
                  ],
                  "type": "tag"
                }
              ],
              "hide": false,
              "measurement": "opnfv_yardstick_tc037",
              "query": "SELECT \"packets_sent\" AS \"packets_sent\" FROM \"opnfv_yardstick_tc037\" WHERE $timeFilter GROUP BY \"deploy_scenario\", \"pod_name\", \"task_id\"",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "packets_sent"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [
                      "packets_sent"
                    ],
                    "type": "alias"
                  }
                ]
              ],
              "tags": []
            },
            {
              "alias": "$tag_pod_name - $tag_deploy_scenario - latency",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "pod_name"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "task_id"
                  ],
                  "type": "tag"
                }
              ],
              "measurement": "opnfv_yardstick_tc037",
              "query": "SELECT \"rtt\" AS \"latency\" FROM \"opnfv_yardstick_tc037\" WHERE $timeFilter GROUP BY \"deploy_scenario\", \"pod_name\", \"task_id\"",
              "refId": "B",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "rtt"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [
                      "latency"
                    ],
                    "type": "alias"
                  }
                ]
              ],
              "tags": []
            }
          ],
          "timeFrom": "24h",
          "timeShift": null,
          "title": "Packets sent, latency",
          "tooltip": {
            "shared": true,
            "value_type": "individual"
          },
          "type": "graph",
          "x-axis": true,
          "y-axis": true,
          "y_formats": [
            "none",
            "ms"
          ]
        }
      ],
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "250px",
      "panels": [
        {
          "content": "\n<html>\n<head>\n<style>\ntable {\n    border-collapse: collapse;\n    width: 100%;\n}\n\nth, td {\n    padding: 8px;\n    text-align: left;\n    border-bottom: 1px solid #ddd;\n}\n</style>\n</head>\n<body>\n\n<h3 style=\"font-family:Verdana\"><a style=\"color:#31A7D3\">Generic Test Cases</a></h3>\n\n<table>\n  <tr>\n    <th>Test Case</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc002.html\">TC002</a></td>\n    <td>Network latency using ping</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc005.html\">TC005</a></td>\n    <td>Storage IOPS, throughput and latency using fio</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc010.html\">TC010</a></td>\n    <td>Memory read latency using lmbench</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc011.html\">TC011</a></td>\n    <td>Packet delay variation (jitter) using iperf3</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc012.html\">TC012</a></td>\n    <td>Memory read and write bandwidth using lmbench</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc014.html\">TC014</a></td>\n    <td>Processing speed using unixbench</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc027.html\">TC027</a></td>\n    <td>Network latency using ping6</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc037.html\">TC037</a></td>\n    <td>Network throughput and packet loss using pktgen, system load using mpstat and network latency using ping</td>\n  </tr>\n</table>\n\n<br>\n<h3 style=\"font-family:Verdana\"><a style=\"color:#31A7D3\">VTC Test Cases</a></h3>\n\n<table>\n  <tr>\n    <th>Test Case</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc006.html\">TC006</a></td>\n    <td>VTC Data plane throughput with DPDK pktgen</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc007.html\">TC007</a></td>\n    <td>VTC Data plane throughput with DPDK pktgen in the presence of noisy neighbors</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc020.html\">TC020</a></td>\n    <td>VTC instantiation</td>\n  </tr>\n  <tr>\n    <td><a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/brahmaputra/docs/userguide/opnfv_yardstick_tc021.html\">TC021</a></td>\n    <td>VTC instantiation in the presence of noisy neighbors</td>\n  </tr>\n</table>\n\n</body>\n</html>\n",
          "editable": true,
          "error": false,
          "id": 3,
          "isNew": true,
          "links": [],
          "mode": "html",
          "span": 5,
          "style": {
            "font-size": "72pt"
          },
          "title": "OPNFV Release-B test cases",
          "type": "text"
        },
        {
          "editable": true,
          "error": false,
          "height": "10",
          "id": 1,
          "isNew": true,
          "limit": 15,
          "links": [],
          "mode": "search",
          "query": "",
          "span": 2,
          "tags": [
            "yardstick-tc"
          ],
          "title": "Dashboards",
          "transparent": false,
          "type": "dashlist"
        },
        {
          "columns": [],
          "datasource": "yardstick-vtc",
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "height": "",
          "id": 10,
          "isNew": true,
          "links": [],
          "pageSize": null,
          "scroll": false,
          "showHeader": true,
          "sort": {
            "col": 0,
            "desc": true
          },
          "span": 5,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "alias": "$tag_deploy_scenario - $tag_pod_name",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "24h"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "pod_name"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                }
              ],
              "measurement": "opnfv_yardstick_tc002",
              "query": "SELECT mean(\"rtt\") FROM \"opnfv_yardstick_tc002\" WHERE $timeFilter GROUP BY time(24h), \"pod_name\", \"deploy_scenario\"",
              "refId": "A",
              "resultFormat": "table",
              "select": [
                [
                  {
                    "params": [
                      "rtt"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "tags": []
            }
          ],
          "timeFrom": "24h",
          "title": "Network Latency (ms)",
          "transform": "table",
          "type": "table"
        }
      ],
      "title": "New row"
    }
  ],
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "templating": {
    "list": []
  },
  "annotations": {
    "list": []
  },
  "refresh": false,
  "schemaVersion": 8,
  "version": 124,
  "links": []
}
| | - run() | | - publish_report() | | - check_criteria() | | | +-----------------------------------------+ | | V V +--------------------+ +--------------------------+ | | | | | feature | | vnf_base | | | | | | - prepare() | | - prepare() | | - execute() | | - deploy_orchestrator() | | - post() | | - deploy_vnf() | | - parse_results() | | - test_vnf() | | | | - clean() | | | | - execute() | | | | | +--------------------+ +--------------------------+ Functest util classes ===================== In order to simplify the creation of test cases, Functest develops some functions that can be used by any feature or internal test cases. Several features are supported such as logger, configuration management and Openstack capabilities (snapshot, clean, tacker,..). These functions can be found under <repo>/functest/utils and can be described as follows: functest/utils/ |-- config.py |-- constants.py |-- env.py |-- functest_logger.py |-- functest_utils.py |-- openstack_clean.py |-- openstack_snapshot.py |-- openstack_tacker.py `-- openstack_utils.py Note that for Openstack, keystone v3 is now deployed by default by compass, fuel and joid in Danube. All installers still support keysone v2 (deprecated in next version). Test collection framework ========================= The OPNFV testing group created a test collection database to collect the test results from CI: http://testresults.opnfv.org/test/swagger/spec.html Authentication: opnfv/api@opnfv Any test project running on any lab integrated in CI can push the results to this database. This database can be used to see the evolution of the tests and compare the results versus the installers, the scenarios or the labs. Overall Architecture -------------------- The Test result management can be summarized as follows:: +-------------+ +-------------+ +-------------+ | | | | | | | Test | | Test | | Test | | Project #1 | | Project #2 | | Project #N | | | | | | | +-------------+ +-------------+ +-------------+ | | | V V V +-----------------------------------------+ | | | Test Rest API front end | | http://testresults.opnfv.org/test | | | +-----------------------------------------+ A | | V | +-------------------------+ | | | | | Test Results DB | | | Mongo DB | | | | | +-------------------------+ | | +----------------------+ | | | test Dashboard | | | +----------------------+ TestAPI description ------------------- The TestAPI is used to declare pods, projects, test cases and test results. Pods are the pods used to run the tests. The results pushed in the database are related to pods, projects and cases. If you try to push results of test done on non referenced pod, the API will return an error message. An additional method dashboard has been added to post-process the raw results in release Brahmaputra (deprecated in Colorado). The data model is very basic, 5 objects are created: * Pods * Projects * Testcases * Results * Scenarios The code of the API is hosted in the releng repository `[6]`_. The static documentation of the API can be found at `[17]`_. The TestAPI has been dockerized and may be installed locally in your lab. See `[15]`_ for details. The deployment of the TestAPI has been automated. A jenkins job manages: * the unit tests of the TestAPI * the creation of a new docker file * the deployment of the new TestAPI * the archive of the old TestAPI * the backup of the Mongo DB TestAPI Authorization ~~~~~~~~~~~~~~~~~~~~~ PUT/DELETE/POST operations of the TestAPI now require token based authorization. The token needs to be added in the request using a header 'X-Auth-Token' for access to the database. e.g:: headers['X-Auth-Token'] The value of the header i.e the token can be accessed in the jenkins environment variable *TestApiToken*. The token value is added as a masked password. .. code-block:: python headers['X-Auth-Token'] = os.environ.get('TestApiToken') The above example is in Python. Token based authentication has been added so that only ci pods jenkins job can have access to the database. Please note that currently token authorization is implemented but is not yet enabled. Automatic reporting =================== An automatic reporting page has been created in order to provide a consistant view of the scenarios. In this page, each scenario is evaluated according to test criteria. The code for the automatic reporting is available at `[8]`_. The results are collected from the centralized database every day and, per scenario. A score is calculated based on the results from the last 10 days. This score is the addition of single test scores. Each test case has a success criteria reflected in the criteria field from the results. Considering an instance of a scenario os-odl_l2-nofeature-ha, the scoring is the addition of the scores of all the runnable tests from the categories (tiers healthcheck, smoke and features) corresponding to this scenario. +---------------------+---------+---------+---------+---------+ | Test | Apex | Compass | Fuel | Joid | +=====================+=========+=========+=========+=========+ | vPing_ssh | X | X | X | X | +---------------------+---------+---------+---------+---------+ | vPing_userdata | X | X | X | X | +---------------------+---------+---------+---------+---------+ | tempest_smoke_serial| X | X | X | X | +---------------------+---------+---------+---------+---------+ | rally_sanity | X | X | X | X | +---------------------+---------+---------+---------+---------+ | odl | X | X | X | X | +---------------------+---------+---------+---------+---------+ | promise | | | X | X | +---------------------+---------+---------+---------+---------+ | doctor | X | | X | | +---------------------+---------+---------+---------+---------+ | security_scan | X | | | | +---------------------+---------+---------+---------+---------+ | parser | | | X | | +---------------------+---------+---------+---------+---------+ | copper | X | | | X | +---------------------+---------+---------+---------+---------+ src: colorado (see release note for the last matrix version) All the testcases listed in the table are runnable on os-odl_l2-nofeature scenarios. If no result is available or if all the results are failed, the test case get 0 point. If it was succesfull at least once but not anymore during the 4 runs, the case get 1 point (it worked once). If at least 3 of the last 4 runs were successful, the case get 2 points. If the last 4 runs of the test are successful, the test get 3 points. In the example above, the target score for fuel/os-odl_l2-nofeature-ha is 3x6 = 18 points. The scenario is validated per installer when we got 3 points for all individual test cases (e.g 18/18). Please note that complex or long duration tests are not considered for the scoring. The success criteria are not always easy to define and may require specific hardware configuration. These results however provide a good level of trust on the scenario. A web page is automatically generated every day to display the status. This page can be found at `[9]`_. For the status, click on Status menu, you may also get feedback for vims and tempest_smoke_serial test cases. Any validated scenario is stored in a local file on the web server. In fact as we are using a sliding windows to get results, it may happen that a successful scenarios is no more run (because considered as stable) and then the number of iterations (4 needed) would not be sufficient to get the green status. Please note that other test cases (e.g. sfc_odl, bgpvpn) need also ODL configuration addons and as a consequence specific scenario. There are not considered as runnable on the generic odl_l2 scenario. Dashboard ========= Dashboard is used to provide a consistant view of the results collected in CI. The results showed on the dashboard are post processed from the Database, which only contains raw results. In Brahmaputra, we created a basic dashboard. Since Colorado, it was decided to adopt ELK framework. Mongo DB results are extracted to feed Elasticsearch database (`[7]`_). A script was developed to build elasticsearch data set. This script can be found in `[16]`_. For next versions, it was decided to integrated bitergia dashboard. Bitergia already provides a dashboard for code and infrastructure. A new Test tab will be added. The dataset will be built by consuming the TestAPI. ======= How TOs ======= How Functest works? =================== The installation and configuration of the Functest docker image is described in `[1]`_. The procedure to start tests is described in `[2]`_ How can I contribute to Functest? ================================= If you are already a contributor of any OPNFV project, you can contribute to functest. If you are totally new to OPNFV, you must first create your Linux Foundation account, then contact us in order to declare you in the repository database. We distinguish 2 levels of contributors: * the standard contributor can push patch and vote +1/0/-1 on any Functest patch * The commitor can vote -2/-1/0/+1/+2 and merge Functest commitors are promoted by the Functest contributors. Where can I find some help to start? ==================================== This guide is made for you. You can also have a look at the project wiki page `[10]`_. There are references on documentation, video tutorials, tips... You can also directly contact us by mail with [Functest] prefix in the title at opnfv-tech-discuss@lists.opnfv.org or on the IRC chan #opnfv-functest. What kind of testing do you do in Functest? =========================================== Functest is focusing on Functional testing. The results must be PASS or FAIL. We do not deal with performance and/or qualification tests. We consider OPNFV as a black box and execute our tests from the jumphost according to Pharos reference technical architecture. Upstream test suites are integrated (Rally/Tempest/ODL/ONOS,...). If needed Functest may bootstrap temporarily testing activities if they are identified but not covered yet by an existing testing project (e.g security_scan before the creation of the security repository) How test constraints are defined? ================================= Test constraints are defined according to 2 paramaters: * The scenario (DEPLOY_SCENARIO env variable) * The installer (INSTALLER_TYPE env variable) A scenario is a formal description of the system under test. The rules to define a scenario are described in `[4]`_ These 2 constraints are considered to determinate if the test is runnable or not (e.g. no need to run onos suite on odl scenario). In the test declaration for CI, the test owner shall indicate these 2 constraints. The file testcases.yaml `[5]`_ must be patched in git to include new test cases. A more elaborated system based on template is planned for next releases For each dependency, it is possible to define a regex:: name: promise criteria: 'success_rate == 100%' description: >- Test suite from Promise project. dependencies: installer: '(fuel)|(joid)' scenario: '' In the example above, it means that promise test will be runnable only with joid or fuel installers on any scenario. The vims criteria means any installer and exclude onos and odl with bgpvpn scenarios:: name: vims criteria: 'status == "PASS"' description: >- This test case deploys an OpenSource vIMS solution from Clearwater using the Cloudify orchestrator. It also runs some signaling traffic. dependencies: installer: '' scenario: '(ocl)|(nosdn)|^(os-odl)((?!bgpvpn).)*$' How to write and check constaint regex? ======================================= Regex are standard regex. You can have a look at `[11]`_ You can also easily test your regex via an online regex checker such as `[12]`_. Put your scenario in the TEST STRING window (e.g. os-odl_l3-ovs-ha), put your regex in the REGULAR EXPRESSION window, then you can test your rule. How to know which test I can run? ================================= You can use the API `[13]`_. The static declaration is in git `[5]`_ If you are in a Functest docker container (assuming that the environement has been prepared): just use the CLI. You can get the list per Test cases or by Tier:: # functest testcase list healthcheck vping_ssh vping_userdata tempest_smoke_serial rally_sanity odl doctor security_scan tempest_full_parallel rally_full vims # functest tier list - 0. healthcheck: ['healthcheck'] - 1. smoke: ['vping_ssh', 'vping_userdata', 'tempest_smoke_serial', 'rally_sanity'] - 2. sdn_suites: ['odl'] - 3. features: ['doctor', 'security_scan'] - 4. openstack: ['tempest_full_parallel', 'rally_full'] - 5. vnf: ['vims'] How to manually start Functest tests? ===================================== Assuming that you are connected on the jumphost and that the system is "Pharos compliant", i.e the technical architecture is compatible with the one defined in the Pharos project:: # docker pull opnfv/functest:latest # envs="-e INSTALLER_TYPE=fuel -e INSTALLER_IP=10.20.0.2 -e DEPLOY_SCENARIO=os-odl_l2-nofeature-ha -e CI_DEBUG=true" # sudo docker run --privileged=true -id ${envs} opnfv/functest:latest /bin/bash Then you must connect to the docker container and source the credentials:: # docker ps (copy the id) # docker exec -ti <container_id> bash # source $creds You must first check if the environment is ready:: # functest env status Functest environment ready to run tests. If not ready, prepare the env by launching:: # functest env prepare Functest environment ready to run tests. Once the Functest env is ready, you can use the CLI to start tests. You can run test cases per test case or per tier: # functest testcase run <case name> or # functest tier run <tier name> e.g:: # functest testcase run tempest_smoke_serial # functest tier run features If you want to run all the tests you can type:: # functest testcase run all If you want to run all the tiers (same at the end that running all the test cases) you can type:: # functest tier run all How to declare my tests in Functest? ==================================== If you want to add new internal test cases, you can submit patch under the testcases directory of Functest repository. For feature test integration, the code can be kept into your own repository. The Functest files to be modified are: * functest/docker/Dockerfile: get your code in Functest container * functest/ci/testcases.yaml: reference your test and its associated constraints Dockerfile ---------- This file lists the repositories (internal or external) to be cloned in the Functest container. You can also add external packages:: RUN git clone https://gerrit.opnfv.org/gerrit/<your project> ${REPOS_DIR}/<your project> testcases.yaml -------------- All the test cases that must be run from CI / CLI must be declared in ci/testcases.yaml. This file is used to get the constraints related to the test:: name: <my_super_test_case> criteria: <not used yet in Colorado, could be > 'PASS', 'rate > 90%' description: >- <the description of your super test suite> dependencies: installer: regex related to installer e.g. 'fuel', '(apex)||(joid)' scenario: regex related to the scenario e.g. 'ovs*no-ha' You must declare your test case in one of the category (tier). If you are integrating test suites from a feature project, the default category is **features**. How to select my list of tests for CI? ====================================== Functest can be run automatically from CI, a jenkins job is usually called after an OPNFV fresh installation. By default we try to run all the possible tests (see `[14]` called from Functest jenkins job):: cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" Each case can be configured as daily and/or weekly task. Weekly tasks are used for long duration or experimental tests. Daily tasks correspond to the minimum set of test suites to validate a scenario. When executing run_tests.py, a check based on the jenkins build tag will be considered to detect whether it is a daily and/or a weekly test. in your CI you can customize the list of test you want to run by case or by tier, just change the line:: cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t <whatever you want> ${flags}" e.g.:: cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t healthcheck,smoke ${flags}" This command will run all the test cases of the first 2 tiers, i.e. healthcheck, connection_check, api_check, vping_ssh, vping_userdata, snaps_somke, tempest_smoke_serial and rally_sanity. How to push your results into the Test Database =============================================== The test database is used to collect test results. By default it is enabled only for CI tests from Production CI pods. The architecture and associated API is described in previous chapter. If you want to push your results from CI, you just have to call the API at the end of your script. You can also reuse a python function defined in functest_utils.py:: def push_results_to_db(db_url, case_name, logger, pod_name,version, payload): """ POST results to the Result target DB """ url = db_url + "/results" installer = get_installer_type(logger) params = {"project_name": "functest", "case_name": case_name, "pod_name": pod_name, "installer": installer, "version": version, "details": payload} headers = {'Content-Type': 'application/json'} try: r = requests.post(url, data=json.dumps(params), headers=headers) if logger: logger.debug(r) return True except Exception, e: print "Error [push_results_to_db('%s', '%s', '%s', '%s', '%s')]:" \ % (db_url, case_name, pod_name, version, payload), e return False Where can I find the documentation on the test API? =================================================== http://artifacts.opnfv.org/releng/docs/testapi.html How to exclude Tempest case from default Tempest smoke suite? ============================================================= Tempest default smoke suite deals with 165 test cases. Since Colorado the success criteria is 100%, i.e. if 1 test is failed the success criteria is not matched for the scenario. It is necessary to exclude some test cases that are expected to fail due to known upstream bugs (see release notes). A file has been created for such operation: https://git.opnfv.org/cgit/functest/tree/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt. It can be described as follows:: - scenarios: - os-odl_l2-bgpvpn-ha - os-odl_l2-bgpvpn-noha installers: - fuel - apex tests: - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers - tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_server_details - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers - tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details - tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard - tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern Please note that each exclusion must be justified. the goal is not to exclude test cases because they do not pass. Several scenarios reached the 100% criteria. So it is expected in the patch submited to exclude the cases to indicate the reasons of the exclusion. How do I know the Functest status of a scenario? ================================================ A Functest automatic reporting page is generated daily. This page is dynamically created through a cron job and is based on the results stored in the Test DB. You can access this reporting page: http://testresults.opnfv.org/reporting See https://wiki.opnfv.org/pages/viewpage.action?pageId=6828617 for details. I have tests, to which category should I declare them? ====================================================== CATEGORIES/TIERS description: +----------------+-------------------------------------------------------------+ | healthcheck | Simple OpenStack healtcheck tests case that validates the | | | basic operations in OpenStack | +----------------+-------------------------------------------------------------+ | Smoke | Set of smoke test cases/suites to validate the most common | | | OpenStack and SDN Controller operations | +----------------+-------------------------------------------------------------+ | Features | Test cases that validate a specific feature on top of OPNFV.| | | Those come from Feature projects and need a bit of support | | | for integration | +----------------+-------------------------------------------------------------+ | Components | Advanced Openstack tests: Full Tempest, Full Rally | +----------------+-------------------------------------------------------------+ | Performance | Out of Functest Scope | +----------------+-------------------------------------------------------------+ | VNF | Test cases related to deploy an open source VNF including | | | an orchestrator | +----------------+-------------------------------------------------------------+ The main ambiguity could be between features and VNF. In fact sometimes you have to spawn VMs to demonstrate the capabilities of the feature you introduced. We recommend to declare your test in the feature category. VNF category is really dedicated to test including: * creation of resources * deployement of an orchestrator/VNFM * deployment of the VNF * test of the VNFM * free resources The goal is not to study a particular feature on the infrastructure but to have a whole end to end test of a VNF automatically deployed in CI. Moreover VNF are run in weekly jobs (one a week), feature tests are in daily jobs and use to get a scenario score. Where are the logs? =================== Functest deals with internal and external testcases. Each testcase can generate logs. Since Colorado we introduce the possibility to push the logs to the artifact. A new script (https://git.opnfv.org/releng/tree/utils/push-test-logs.sh) has been created for CI. When called, and assuming that the POD is authorized to push the logs to artifacts, the script will push all the results or logs locally stored under /home/opnfv/functest/results/. If the POD is not connected to CI, logs are not pushed. But in both cases, logs are stored in /home/opnfv/functest/results in the container. Projects are encouraged to push their logs here. Since Colorado it is also easy for feature project to integrate this feature by adding the log file as output_file parameter when calling execute_command from functest_utils library ret_val = functest_utils.execute_command(cmd, output_file=log_file) How does Functest deal with VNF onboarding? =========================================== VNF onboarding has been introduced in Brahmaputra through the automation of a clearwater vIMS deployed thanks to cloudify orchestrator. This automation has been described at OpenStack summit Barcelona: https://youtu.be/Jr4nG74glmY The goal of Functest consists in testing OPNFV from a functional perspective: the NFVI and/or the features developed in OPNFV. Feature test suites are provided by the feature project. Functest just simplifies the integration of the suite into the CI and gives a consolidated view of the tests per scenario. Functest does not develop VNFs. Functest does not test any MANO stack. OPNFV projects dealing with VNF onboarding ------------------------------------------ Testing VNF is not the main goal however it gives interesting and realistic feedback on OPNFV as a Telco cloud. Onboarding VNF also allows to test a full stack: orchestrator + VNF. Functest is VNF and MANO stack agnostic. An internship has been initiated to reference the Open Source VNF: Intern Project Open Source VNF catalog New projects dealing with orchestrators or VNFs are candidate for Danube. The 2 projects dealing with orchestration are: * orchestra (Openbaton) * opera (Open-O) The Models project address various goals for promoting availability and convergence of information and/or data models related to NFV service/VNF management, as being defined in standards (SDOs) and as developed in open source projects. Functest VNF onboarding ----------------------- In order to simplify VNF onboarding a new abstraction class has been developed in Functest. This class is based on vnf_base and can be described as follow: +------------+ +--------------+ | test_base |------------>| vnf_base | +------------+ +--------------+ |_ prepare |_ deploy_orchestrator (optional) |_ deploy_vnf |_ test_vnf |_ clean Several methods are declared in vnf_base: * prepare * deploy_orchestrator * deploy_vnf * test_vnf * clean deploy_vnf and test_vnf are mandatory. prepare will create a user and a project. How to declare your orchestrator/VNF? ------------------------------------- 1) test declaration You must declare your testcase in the file <Functest repo>/functest/ci/testcases.yaml 2) configuration You can precise some configuration parameters in config_functest.yaml 3) implement your test Create your own VnfOnboarding file you must create your entry point through a python clase as referenced in the configuration file e.g. aaa => creation of the file <Functest repo>/functest/opnfv_tests/vnf/aaa/aaa.py the class shall inherit vnf_base. You must implement the methods deploy_vnf() and test_vnf() and may implement deploy_orchestrator() you can call the code from your repo (but need to add the repo in Functest if it is not the case) 4) success criteria So far we considered the test as PASS if vnf_deploy and test_vnf is PASS (see example in aaa). ========== References ========== _`[1]`: http://artifacts.opnfv.org/functest/docs/configguide/index.html Functest configuration guide _`[2]`: http://artifacts.opnfv.org/functest/docs/userguide/index.html functest user guide _`[3]`: https://wiki.opnfv.org/opnfv_test_dashboard Brahmaputra dashboard _`[4]`: https://wiki.opnfv.org/display/INF/CI+Scenario+Naming _`[5]`: https://git.opnfv.org/cgit/functest/tree/ci/testcases.yaml _`[6]`: https://git.opnfv.org/cgit/releng/tree/utils/test/result_collection_api _`[7]`: https://git.opnfv.org/cgit/releng/tree/utils/test/scripts _`[8]`: https://git.opnfv.org/cgit/releng/tree/utils/test/reporting/functest _`[9]`: http://testresults.opnfv.org/reporting/ _`[10]`: https://wiki.opnfv.org/opnfv_functional_testing _`[11]`: https://docs.python.org/2/howto/regex.html _`[12]`: https://regex101.com/ _`[13]`: http://testresults.opnfv.org/test/api/v1/projects/functest/cases _`[14]`: https://git.opnfv.org/cgit/releng/tree/jjb/functest/functest-daily.sh _`[15]`: https://git.opnfv.org/cgit/releng/tree/utils/test/result_collection_api/README.rst _`[16]`: https://git.opnfv.org/cgit/releng/tree/utils/test/scripts/mongo_to_elasticsearch.py _`[17]`: http://artifacts.opnfv.org/releng/docs/testapi.html OPNFV main site: http://www.opnfv.org OPNFV functional test page: https://wiki.opnfv.org/opnfv_functional_testing IRC support chan: #opnfv-functest _`OpenRC`: http://docs.openstack.org/user-guide/common/cli_set_environment_variables_using_openstack_rc.html _`Rally installation procedure`: https://rally.readthedocs.org/en/latest/tutorial/step_0_installation.html _`config_functest.yaml` : https://git.opnfv.org/cgit/functest/tree/functest/ci/config_functest.yaml