diff --git a/httprunner/runner.py b/httprunner/runner.py index 815d8112..21fe4c3c 100644 --- a/httprunner/runner.py +++ b/httprunner/runner.py @@ -46,7 +46,7 @@ class SessionRunner(object): __export: List[Text] = [] __step_results: List[StepResult] = [] __session_variables: VariablesMapping = {} - __is_reference: bool = False + __is_referenced: bool = False # time __start_at: float = 0 __duration: float = 0 @@ -58,7 +58,7 @@ class SessionRunner(object): self.__session_variables = self.__session_variables or {} self.__start_at = 0 self.__duration = 0 - self.__is_reference = self.__is_reference or False + self.__is_referenced = self.__is_referenced or False self.__project_meta = self.__project_meta or load_project_meta( self.__config.path @@ -78,8 +78,8 @@ class SessionRunner(object): def get_config(self) -> TConfig: return self.__config - def set_references(self) -> "SessionRunner": - self.__is_reference = True + def set_referenced(self) -> "SessionRunner": + self.__is_referenced = True return self def with_case_id(self, case_id: Text) -> "SessionRunner": @@ -214,7 +214,7 @@ class SessionRunner(object): self.__init() self.__parse_config(param) - if ALLURE is not None and not self.__is_reference: + if ALLURE is not None and not self.__is_referenced: # update allure report meta ALLURE.dynamic.title(self.__config.name) ALLURE.dynamic.description(f"TestCase ID: {self.case_id}") diff --git a/httprunner/step_testcase.py b/httprunner/step_testcase.py index 91415a34..b9cdf24d 100644 --- a/httprunner/step_testcase.py +++ b/httprunner/step_testcase.py @@ -22,7 +22,7 @@ def run_step_testcase(runner: HttpRunner, step: TStep) -> StepResult: # step.testcase is a referenced testcase, e.g. RequestWithFunctions ref_case_runner = step.testcase() - ref_case_runner.set_references().with_session(runner.session).with_case_id( + ref_case_runner.set_referenced().with_session(runner.session).with_case_id( runner.case_id ).with_variables(step_variables).with_export(step_export).test_start()