refactor: rearrange the report, failed test cases will be displayed  at the head of the report.
This commit is contained in:
t-bug
2019-12-05 19:39:58 +08:00
parent 8082e73882
commit 90532f8c0a

View File

@@ -131,7 +131,10 @@ class HttpRunner(object):
logger.log_info("Start to run testcase: {}".format(testcase_name))
result = self.unittest_runner.run(testcase)
tests_results.append((testcase, result))
if result.wasSuccessful():
tests_results.append((testcase, result))
else:
tests_results.insert(0, (testcase, result))
return tests_results