可选storage: StorageProvider受保护_受保护init受保护log受保护dirty受保护saveInitialize the manager. This method is idempotent. If already initialized, returns immediately. If initialization is in progress, waits for it to complete.
Check if the manager has been initialized.
Wait for the manager to be ready. Automatically calls initialize() if not already initialized.
受保护scheduleSchedule a save operation to be executed after a delay. Multiple calls will be debounced - only one save will occur.
The async function to call for saving
受保护setSet the delay for automatic save operations.
Delay in milliseconds
受保护doSubclasses must implement this method to perform actual initialization. This method is called exactly once, when initialize() is first called.
可选options: { resetHistory?: boolean }对指定测试进行根因分析 综合运行历史和上下文信息,判断 Flaky 的根本原因
测试 ID
可选context: AnalysisContext分析上下文(可选,默认使用内部缓存的运行数据)
根因分析结果,测试不存在时返回 null
分析同次运行中多个 Flaky 测试的关联性 如果多个测试频繁在同一次运行中一起失败,可能是环境问题
可选config: Partial<CorrelationConfig>关联分析配置(可选)
关联组列表
对指定测试进行趋势分析 包括时间序列聚合、趋势方向、变点检测、季节模式、预测
测试 ID
可选codeChanges: CodeChangeCorrelation[]代码变更记录(可选,用于关联分析)
趋势分析结果,测试不存在时返回 null
对所有 Flaky 测试进行批量趋势分析
可选codeChanges: CodeChangeCorrelation[]代码变更记录(可选)
趋势分析结果映射
对指定测试进行失败预测 基于持续时间异常、失败模式、环境偏移、资源压力等信号
测试 ID
预测结果,测试不存在时返回 null
获取隔离预算使用情况
预算状态
可选testId: string获取当前生效的完整配置(含默认值填充)
包含 flakyCriteria 和 quarantineCriteria 的完整配置
Immediately flush any pending save operations. Clears any scheduled save and executes it immediately.
Extended base manager with automatic save scheduling functionality. Useful for managers that need to persist data periodically.
示例