Commit bff74b2e authored by Xiaowu Zhang's avatar Xiaowu Zhang

stack/erp5: fix test count incorrect issue

parent 73e93d60
......@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template-run-zelenium]
filename = run-zelenium-test.py.in
md5sum = 99004d9571b2574bb05058140d170013
md5sum = cc19560b9400cecbd23064d55c501eec
[template]
filename = instance.cfg.in
......
......@@ -155,28 +155,21 @@ def main():
'command': url,
'stdout': agent,
'stderr': '',
'html_test_result': 'Not Executed due to saucelabs related error'
'html_test_result': 'Not Executed due to selenium server related error'
}
else:
skip_count = success_count = error_count = 0
skip_count = error_count = 0
test_table = tr[1].xpath('.//table')[0]
test_tbody = tr[1].xpath('.//tbody')[0]
tr_count = len(test_tbody)
for tr in test_tbody:
# print etree.tostring(tr).split('\n')[0]
status = tr.attrib.get('class')
if status is None or 'status_done' in status:
skip_count += 1
elif 'status_passed' in status:
success_count += 1
skip_count = 1
elif 'status_failed' in status:
error_count += 1
error_count = 1
test_line_dict[test_name] = {
'test_count': tr_count,
'test_count': 1,
'error_count': error_count,
'failure_count': tr_count - (skip_count + success_count + error_count),
'failure_count': 0,
'skip_count': skip_count,
'duration': test_execution_duration,
'command': url,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment