# 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,
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
# ********************************
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'])})