mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 17:29:56 +08:00
fix: log testcase duration before raise ValidationFailure
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- fix: missing request json
|
||||
- fix: override testsuite/testcase config verify
|
||||
- fix: only strip whitespaces and tabs, \n\r are left because they maybe used in changeset
|
||||
- fix: log testcase duration before raise ValidationFailure
|
||||
|
||||
**Changed**
|
||||
|
||||
|
||||
@@ -149,6 +149,8 @@ class HttpRunner(object):
|
||||
except ValidationFailure:
|
||||
self.__session.data.success = False
|
||||
log_req_resp_details()
|
||||
# log testcase duration before raise ValidationFailure
|
||||
self.__duration = time.time() - self.__start_at
|
||||
raise
|
||||
finally:
|
||||
# save request & response meta data
|
||||
|
||||
Reference in New Issue
Block a user