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