summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/test/result_collection_api/dashboard/functest2Dashboard.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/test/result_collection_api/dashboard/functest2Dashboard.py b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
index 3f4e1a2db..a2ed3085c 100644
--- a/utils/test/result_collection_api/dashboard/functest2Dashboard.py
+++ b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
@@ -213,6 +213,25 @@ def format_Tempest_for_dashboard(results):
'data_set': [{'Run': nbTests,
'Failed': nbFailures}]})
+ # Graph 4: (Success rate)=f(time)
+ # ***************************************
+ new_element = []
+ for data in results:
+ try:
+ diff = (int(data['details']['tests']) - int(data['details']['failures']))
+ success_rate = 100*diff/int(data['details']['tests'])
+ except:
+ success_rate = 0
+
+ new_element.append({'x': data['creation_date'],
+ 'y1': success_rate})
+
+ test_data.append({'name': "Tempest success rate",
+ 'info': {'type': "graph",
+ 'xlabel': 'time',
+ 'y1label': 'Success rate'},
+ 'data_set': new_element})
+
return test_data