mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
print http request kwargs when exception occured.
This commit is contained in:
@@ -124,8 +124,9 @@ class Runner(object):
|
||||
try:
|
||||
resp_obj.validate(validators, self.context.get_testcase_variables_mapping())
|
||||
except (exception.ParamsError, exception.ResponseError, exception.ValidationError):
|
||||
text = "Exception occured. HTTP response content shows below: \n{}".format(resp.text)
|
||||
logging.error(text)
|
||||
logging.error("Exception occured.")
|
||||
logging.error("HTTP request kwargs: \n{}".format(parsed_request))
|
||||
logging.error("HTTP response content: \n{}".format(resp.text))
|
||||
raise
|
||||
|
||||
setup_teardown(teardown_actions)
|
||||
|
||||
Reference in New Issue
Block a user