mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix: ensure referenced testcase share the same session
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
|
## 3.0.5 (2020-05-21)
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
- fix: ensure referenced testcase share the same session
|
||||||
|
|
||||||
## 3.0.4 (2020-05-19)
|
## 3.0.4 (2020-05-19)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ class HttpRunner(object):
|
|||||||
parsed_request_dict["json"] = parsed_request_dict.pop("req_json", {})
|
parsed_request_dict["json"] = parsed_request_dict.pop("req_json", {})
|
||||||
|
|
||||||
# request
|
# request
|
||||||
self.__session = self.__session or HttpSession()
|
|
||||||
resp = self.__session.request(method, url, **parsed_request_dict)
|
resp = self.__session.request(method, url, **parsed_request_dict)
|
||||||
resp_obj = ResponseObject(resp)
|
resp_obj = ResponseObject(resp)
|
||||||
|
|
||||||
@@ -184,6 +183,7 @@ class HttpRunner(object):
|
|||||||
parse_config(self.config)
|
parse_config(self.config)
|
||||||
self.__start_at = time.time()
|
self.__start_at = time.time()
|
||||||
self.__step_datas: List[StepData] = []
|
self.__step_datas: List[StepData] = []
|
||||||
|
self.__session = self.__session or HttpSession()
|
||||||
self.__session_variables = {}
|
self.__session_variables = {}
|
||||||
for step in self.teststeps:
|
for step in self.teststeps:
|
||||||
# update with config variables
|
# update with config variables
|
||||||
|
|||||||
Reference in New Issue
Block a user