mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
change: rename TestCaseInOut field
This commit is contained in:
@@ -104,7 +104,7 @@ class HttpRunner(object):
|
||||
result = self.unittest_runner.run(testcase)
|
||||
testcase_summary = report.get_summary(result)
|
||||
testcase_summary.in_out.vars = testcase.config.variables
|
||||
testcase_summary.in_out.out = testcase.config.export
|
||||
testcase_summary.in_out.export = testcase.config.export
|
||||
|
||||
if self.save_tests and log_handler:
|
||||
logger.remove(log_handler)
|
||||
|
||||
@@ -179,7 +179,7 @@ class HttpRunner(object):
|
||||
self.duration = time.time() - self.start_at
|
||||
return self
|
||||
|
||||
def get_export_variables(self):
|
||||
def get_export_variables(self) -> Dict:
|
||||
export_vars_mapping = {}
|
||||
for var_name in self.config.export:
|
||||
if var_name not in self.session_variables:
|
||||
@@ -196,15 +196,17 @@ class HttpRunner(object):
|
||||
start_at_timestamp = self.start_at
|
||||
start_at_iso_format = datetime.utcfromtimestamp(start_at_timestamp).isoformat()
|
||||
return TestCaseSummary(
|
||||
name=self.config.name,
|
||||
success=self.success,
|
||||
time=TestCaseTime(
|
||||
start_at=self.start_at,
|
||||
start_at_iso_format=start_at_iso_format,
|
||||
duration=self.duration,
|
||||
),
|
||||
name=self.config.name,
|
||||
# status=result.status,
|
||||
# attachment=result.attachment,
|
||||
in_out=TestCaseInOut(vars=self.config.variables, out=self.config.export),
|
||||
in_out=TestCaseInOut(
|
||||
vars=self.config.variables, export=self.get_export_variables()
|
||||
),
|
||||
step_datas=self.step_datas,
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ class TestCaseTime(BaseModel):
|
||||
|
||||
class TestCaseInOut(BaseModel):
|
||||
vars: VariablesMapping = {}
|
||||
out: Export = []
|
||||
export: Dict = {}
|
||||
|
||||
|
||||
class RequestStat(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user