feat: print request and response details when running API cases

This commit is contained in:
debugtalk
2022-06-17 19:33:37 +08:00
parent 60502983b3
commit e9b9193bb1
3 changed files with 42 additions and 20 deletions

View File

@@ -227,12 +227,16 @@ class SessionRunner(object):
finally:
logger.info(f"generate testcase log: {self.__log_path}")
if USE_ALLURE:
allure.attach.file(self.__log_path, name='all log', attachment_type=allure.attachment_type.TEXT)
allure.attach.file(
self.__log_path,
name="all log",
attachment_type=allure.attachment_type.TEXT,
)
self.__duration = time.time() - self.__start_at
return self
class HttpRunner(SessionRunner):
# split SessionRunner to keep consistant with golang version
# split SessionRunner to keep consistent with golang version
pass