Hacker News· yasuyuky·· 2 小时前AI 评分22
Show HN:用变异测试找出 Rust 测试中的重叠覆盖
Show HN: Find overlapping Rust tests with mutation testing
AI 导读
新工具 cargo-test-prune 通过变异测试测量每个 Rust 测试实际捕获的故意缺陷,再提出一个观测检测能力相同的更小测试集,且从不删除测试。在 cargo-mutants 27.1.0 的示例中,它发现 6 个测试(1 个被忽略)和 5 个变异体,建议移除 3 个测试、保留 2 个活跃测试即可覆盖全部 5 个变异体。
来源:Hacker News · github.com