diff --git a/httprunner/__init__.py b/httprunner/__init__.py index 2b0bf6b7..1c9ba758 100644 --- a/httprunner/__init__.py +++ b/httprunner/__init__.py @@ -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 diff --git a/httprunner/client.py b/httprunner/client.py index b9606e3f..22ccb8b1 100644 --- a/httprunner/client.py +++ b/httprunner/client.py @@ -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 diff --git a/httprunner/ext/make/__init__.py b/httprunner/ext/make/__init__.py index b4652553..80dad535 100644 --- a/httprunner/ext/make/__init__.py +++ b/httprunner/ext/make/__init__.py @@ -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: diff --git a/httprunner/response.py b/httprunner/response.py index b739da95..bc1f6891 100644 --- a/httprunner/response.py +++ b/httprunner/response.py @@ -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) diff --git a/httprunner/runner.py b/httprunner/runner.py index 7095c145..df2824f5 100644 --- a/httprunner/runner.py +++ b/httprunner/runner.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml index ce3b3c40..6614464f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"