summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-04-20 18:04:41 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-04-20 18:04:41 +0200
commit2ffe80e268fdaa1949b50a514945ce2feb31b9b3 (patch)
treee8d516cf270d84c6ee0e846a4801e227c96552bd /utils
parent117d9d72df6f9a93099328e412d5470b0c99d982 (diff)
bug fix: Rally duration not correct due to result format change
JIRA: FUNCTEST-207 Change-Id: I04892271008a8a7130dbaf39757ab3039167602e Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils')
-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'])})