summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-20 10:57:15 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-20 10:57:16 +0000
commitf029771913cb785bcebe7a5b0509c93d652b345c (patch)
treedcdef798bafeb2a7c0706b684bb6c8959c02dbcd
parentff1454e5d630c19212303c48b73142725ad1e501 (diff)
parent89b4f57e600db67be49c203a137bc71e9a503c42 (diff)
Merge "Adapt dashboard to a second vPing scenario"
-rw-r--r--utils/test/result_collection_api/dashboard/functest2Dashboard.py38
1 files changed, 37 insertions, 1 deletions
diff --git a/utils/test/result_collection_api/dashboard/functest2Dashboard.py b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
index 3e7eefe7e..fbe262c53 100644
--- a/utils/test/result_collection_api/dashboard/functest2Dashboard.py
+++ b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
@@ -21,7 +21,7 @@ def get_functest_cases():
get the list of the supported test cases
TODO: update the list when adding a new test case for the dashboard
"""
- return ["status", "vPing", "vIMS", "Tempest", "odl", "Rally"]
+ return ["status", "vPing", "vPing_userdata", "vIMS", "Tempest", "odl", "Rally"]
def format_functest_for_dashboard(case, results):
@@ -262,3 +262,39 @@ def format_vPing_for_dashboard(results):
'Nb Success': nbTestOk}]})
return test_data
+
+def format_vPing_userdata_for_dashboard(results):
+ """
+ Post processing for the vPing_userdata test case
+ """
+ test_data = [{'description': 'vPing_userdata results for Dashboard'}]
+
+ # Graph 1: Test_Duration = f(time)
+ # ********************************
+ new_element = []
+ for data in results:
+ new_element.append({'x': data['creation_date'],
+ 'y': data['details']['duration']})
+
+ test_data.append({'name': "vPing_userdata duration",
+ 'info': {'type': "graph",
+ 'xlabel': 'time',
+ 'ylabel': 'duration (s)'},
+ 'data_set': new_element})
+
+ # Graph 2: bar
+ # ************
+ nbTest = 0
+ nbTestOk = 0
+
+ for data in results:
+ nbTest += 1
+ if data['details']['status'] == "OK":
+ nbTestOk += 1
+
+ test_data.append({'name': "vPing_userdata status",
+ 'info': {"type": "bar"},
+ 'data_set': [{'Nb tests': nbTest,
+ 'Nb Success': nbTestOk}]})
+
+ return test_data