📡 Idea Radar 每天 8:00 / 18:00 推送 · 18:00 生成精选
reddit · SideProject · 50 分 ← 返回列表

A test that fails 15% of the time still passes three runs in a row 61% of the time

I wrote a gate for GitLab merge requests that does not trust a green pipeline. To check a flaky test fix, it reruns the test 100 times before the change and 100 times after. It alternates the two sides, so machine noise hits both equally. Then it applies an exact statistical test and prints one VERDICT line with the evidence. A diff guard catches the tricks, like loosened assertions or skipped tests. Most verifiers are plain Python with the standard library only, with no API key and

五维评分

付费意愿
35
需求真实度
40
个人可落地
88
竞争空间
42
新鲜度
55

AI 分析

痛点:CI 中不稳定的测试(flaky test)即使被『修复』,也常常只是碰巧变绿;团队缺少一种成本低、可量化、能给出统计结论的手段,来判断修复是否真正有效。

目标用户:受 flaky test 困扰的中小型研发团队、CI/DevOps 工程师、QA 负责人;尤其使用 GitLab/GitHub CI 且测试套件规模较大的团队。

证据:A test that fails 15% of the time still passes three runs in a row 61% of the time / it reruns the test 100 times before the change and 100 times after / How do you decide today that a flaky test is really fixed?

变现:开源核心(MIT 或 open-core);商业化层做成 GitHub App / GitLab CI 插件,按仓库或按并行执行分钟数订阅($19–$99/月/团队);也可托管重跑执行,按时长计费,避免自建跑测机。

MVP:两周 MVP:做一个 GitHub App,监听 PR,对改动相关测试做『改动前 N 次 / 改动后 N 次』交替重跑,输出一条带 p 值和置信区间的 VERDICT 评论,并检测断言放宽、skip 等作弊改动;重跑复用用户自己的 CI runner 以省成本,先只支持 pytest + Jest 两个框架。

竞品:BuildPulse、Trunk Flaky Tests、Datadog Test Optimization (Flaky Test Detector)、Launchable、CircleCI Test Insights / rerun 分析、GitLab 内置 flaky test 报告

摘要:作者发布了 MIT 开源的 GitLab MR 门禁工具 verdict-gate,通过对改动前后各重跑 100 次、交替执行并使用精确统计检验,输出一行带证据的 VERDICT 结论,还会拦截放宽断言、跳过测试等作弊改动。帖子用一个具体数字点出痛点:失败率 15% 的测试连续三次通过的概率高达 61%,即『变绿』不等于修好。整个工具是纯 Python 标准库实现、无需 API key,单人可复制,但作者未提任何付费或收入证据,且该方向已有 BuildPulse、Trunk、Datadog 等商业化竞品。