Skip to content

[Bug] get_summary 统计结果不准确:__step_results 未记录失败的 StepResult #2

Description

@WSitong

在当前实现中(runner.py),SessionRunner.get_summary 会遍历 self.__step_results 判断是否存在失败的 StepResult,以决定整体测试结果是否成功:

summary_success = True
for step_result in self.__step_results:
    if not step_result.success:
        summary_success = False
        break

但是在SessionRunner.__run_step中,如果出现 ValidationFailure,会直接 raise,导致失败的 StepResult 根本没有被 append 到 self.__step_results:

except ValidationFailure:
    if i == step.retry_times:
        raise

因此 self.__step_results 只包含成功的 step 结果,最终 get_summary 始终统计不到失败的情况,导致整体结果可能被误判为成功。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions