summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-20 11:38:29 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-01-20 11:45:33 +0100
commit89b4f57e600db67be49c203a137bc71e9a503c42 (patch)
tree7c97ebc46a8cc0d8e18d6f51302aa46a9accd8c7 /utils/test/result_collection_api
parentba4a27f0da17d9ada4d7bf413dc08268ae92b61f (diff)
Adapt dashboard to a second vPing scenario
Change-Id: Ic1d3b6479b1afdbc1cd42536fba65dd3410b8614 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/result_collection_api')
-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