summaryrefslogtreecommitdiffstats
path: root/utils/test
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-04-21 07:12:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-04-21 07:12:44 +0000
commitb0c0366a5747c03365bc96c6ae5e1f7c3dc7a618 (patch)
treef346bff74b56f8a28f50a9717281fb8a8fc10429 /utils/test
parentdc98ba880408f3ea196121466b87a21917e685ff (diff)
parent2ffe80e268fdaa1949b50a514945ce2feb31b9b3 (diff)
Merge "bug fix: Rally duration not correct due to result format change"
Diffstat (limited to 'utils/test')
-rw-r--r--utils/test/result_collection_api/dashboard/functest2Dashboard.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/utils/test/result_collection_api/dashboard/functest2Dashboard.py b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
index a2ed3085c..379b93279 100644
--- a/utils/test/result_collection_api/dashboard/functest2Dashboard.py
+++ b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
@@ -117,12 +117,15 @@ def format_vIMS_for_dashboard(results):
# Calculate nb of tests run and nb of tests failed
# vIMS_results = get_vIMSresults(vIMS_test)
# print vIMS_results
- if data_test['result'] == "Passed":
- nbTests += 1
- elif data_test['result'] == "Failed":
- nbFailures += 1
- elif data_test['result'] == "Skipped":
- nbSkipped += 1
+ try:
+ if data_test['result'] == "Passed":
+ nbTests += 1
+ elif data_test['result'] == "Failed":
+ nbFailures += 1
+ elif data_test['result'] == "Skipped":
+ nbSkipped += 1
+ except:
+ nbTests = 0
new_element.append({'x': data['creation_date'],
'y1': nbTests,
@@ -149,10 +152,13 @@ def format_vIMS_for_dashboard(results):
nbTestsOK = 0
nbTestsKO = 0
- if data_test['result'] == "Passed":
- nbTestsOK += 1
- elif data_test['result'] == "Failed":
- nbTestsKO += 1
+ try:
+ if data_test['result'] == "Passed":
+ nbTestsOK += 1
+ elif data_test['result'] == "Failed":
+ nbTestsKO += 1
+ except:
+ nbTestsOK = 0
nbTests += nbTestsOK + nbTestsKO
nbFailures += nbTestsKO
@@ -366,7 +372,7 @@ def format_Rally_for_dashboard(results):
# ********************************
new_element = []
for data in results:
- summary_cursor = len(data)
+ summary_cursor = len(data['details']) - 1
new_element.append({'x': data['creation_date'],
'y': int(data['details'][summary_cursor]['summary']['duration'])})