mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
refactor: rename StepData export to export_vars
This commit is contained in:
@@ -148,7 +148,7 @@ class StepData(BaseModel):
|
||||
success: bool = False
|
||||
name: Text = "" # teststep name
|
||||
data: Union[SessionData, List[SessionData]] = None
|
||||
export: Dict = {}
|
||||
export_vars: VariablesMapping = {}
|
||||
|
||||
|
||||
class TestCaseSummary(BaseModel):
|
||||
|
||||
@@ -138,7 +138,7 @@ class HttpRunner(object):
|
||||
# extract
|
||||
extractors = step.extract
|
||||
extract_mapping = resp_obj.extract(extractors)
|
||||
step_data.export = extract_mapping
|
||||
step_data.export_vars = extract_mapping
|
||||
|
||||
variables_mapping = step.variables
|
||||
variables_mapping.update(extract_mapping)
|
||||
@@ -204,12 +204,12 @@ class HttpRunner(object):
|
||||
)
|
||||
|
||||
step_data.data = case_result.get_step_datas() # list of step data
|
||||
step_data.export = case_result.get_export_variables()
|
||||
step_data.export_vars = case_result.get_export_variables()
|
||||
step_data.success = case_result.success
|
||||
self.success &= case_result.success
|
||||
|
||||
if step_data.export:
|
||||
logger.info(f"export variables: {step_data.export}")
|
||||
if step_data.export_vars:
|
||||
logger.info(f"export variables: {step_data.export_vars}")
|
||||
|
||||
return step_data
|
||||
|
||||
@@ -228,7 +228,7 @@ class HttpRunner(object):
|
||||
|
||||
self.__step_datas.append(step_data)
|
||||
logger.info(f"run step end: {step.name} <<<<<<\n")
|
||||
return step_data.export
|
||||
return step_data.export_vars
|
||||
|
||||
def __parse_config(self, config: TConfig) -> NoReturn:
|
||||
config.variables.update(self.__session_variables)
|
||||
|
||||
Reference in New Issue
Block a user