mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
bump version to 3.0.4
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
__version__ = "3.0.3"
|
||||
__version__ = "3.0.4"
|
||||
__description__ = "One-stop solution for HTTP(S) testing."
|
||||
|
||||
from httprunner.runner import HttpRunner
|
||||
|
||||
@@ -195,10 +195,6 @@ class HttpSession(requests.Session):
|
||||
Safe mode has been removed from requests 1.x.
|
||||
"""
|
||||
try:
|
||||
msg = "processed request:\n"
|
||||
msg += f"> {method} {url}\n"
|
||||
msg += f"> kwargs: {kwargs}"
|
||||
logger.debug(msg)
|
||||
return requests.Session.request(self, method, url, **kwargs)
|
||||
except (MissingSchema, InvalidSchema, InvalidURL):
|
||||
raise
|
||||
|
||||
@@ -60,7 +60,7 @@ def convert_testcase_path(testcase_path: Text) -> Tuple[Text, Text]:
|
||||
|
||||
|
||||
def format_pytest_with_black(python_paths: List[Text]):
|
||||
logger.info("format pytest case with black ...")
|
||||
logger.info("format pytest cases with black ...")
|
||||
try:
|
||||
subprocess.run(["black", *python_paths])
|
||||
except subprocess.CalledProcessError as ex:
|
||||
|
||||
@@ -164,6 +164,8 @@ class ResponseObject(object):
|
||||
|
||||
# check item
|
||||
check_item = u_validator["check"]
|
||||
# TODO: validate variable or function
|
||||
# check_item = parse_data(check_item, variables_mapping, functions_mapping)
|
||||
check_value = jmespath.search(check_item, self.resp_obj_meta)
|
||||
check_value = parse_string_value(check_value)
|
||||
|
||||
|
||||
@@ -65,12 +65,8 @@ class HttpRunner(object):
|
||||
method = parsed_request_dict.pop("method")
|
||||
url_path = parsed_request_dict.pop("url")
|
||||
url = build_url(self.config.base_url, url_path)
|
||||
|
||||
parsed_request_dict["json"] = parsed_request_dict.pop("req_json", {})
|
||||
|
||||
logger.info(f"{method} {url}")
|
||||
logger.debug(f"request kwargs(raw): {parsed_request_dict}")
|
||||
|
||||
# request
|
||||
self.__session = self.__session or HttpSession()
|
||||
resp = self.__session.request(method, url, **parsed_request_dict)
|
||||
@@ -148,7 +144,7 @@ class HttpRunner(object):
|
||||
|
||||
def __run_step(self, step: TStep):
|
||||
"""run teststep, teststep maybe a request or referenced testcase"""
|
||||
logger.info(f"run step: {step.name}")
|
||||
logger.info(f"run step begin: {step.name} >>>>>>")
|
||||
|
||||
if step.request:
|
||||
step_data = self.__run_step_request(step)
|
||||
@@ -160,6 +156,7 @@ class HttpRunner(object):
|
||||
)
|
||||
|
||||
self.__step_datas.append(step_data)
|
||||
logger.info(f"run step end: {step.name} <<<<<<\n")
|
||||
return step_data.export
|
||||
|
||||
def run(self, testcase: TestCase):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "httprunner"
|
||||
version = "3.0.3"
|
||||
version = "3.0.4"
|
||||
description = "One-stop solution for HTTP(S) testing."
|
||||
license = "Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
||||
Reference in New Issue
Block a user