fix: add the step type to the summary step result

This commit is contained in:
xucong053
2022-06-20 15:56:31 +08:00
parent 1eac759069
commit dab042ae80
4 changed files with 4 additions and 1 deletions

View File

@@ -81,6 +81,7 @@ def run_step_request(runner: HttpRunner, step: TStep) -> StepResult:
"""run teststep: request"""
step_result = StepResult(
name=step.name,
step_type="request",
success=False,
)
start_time = time.time()

View File

@@ -47,6 +47,7 @@ def run_step_sql_request(runner: HttpRunner, step: TStep) -> StepResult:
step_result = StepResult(
name=step.name,
step_type="sql",
success=False,
)
step_variables = runner.merge_step_variables(step.variables)

View File

@@ -10,7 +10,7 @@ from httprunner.step_request import call_hooks
def run_step_testcase(runner: HttpRunner, step: TStep) -> StepResult:
"""run teststep: referenced testcase"""
step_result = StepResult(name=step.name)
step_result = StepResult(name=step.name, step_type="testcase")
step_variables = runner.merge_step_variables(step.variables)
step_export = step.export

View File

@@ -57,6 +57,7 @@ def run_step_thrift_request(runner: HttpRunner, step: TStep) -> StepResult:
step_result = StepResult(
name=step.name,
step_type="thrift",
success=False,
)
step_variables = runner.merge_step_variables(step.variables)