用自动化测试作为 executable spec,AI 编程才可靠
确实,必要的自动化测试覆盖是基本的 executable spec,如果人认真写当然最好,偷懒一点的话,把需求文档扔给 agent,或者说描述清楚,根据需求文档就能倒推个七七八八 https://t...
两位开发者在讨论 AI 写代码时怎么防回归:与其写漂亮文档,不如把测试当成唯一标准,agent 才不会改一处坏一片。平时依赖 Cursor、Claude Code 这类工具改老项目的人,这篇观点直接能套到自己的工作流里。
geniusvczh 提出,CI 中如果没有足够的 regression test,任何 agent 都无法保证新代码不破坏旧功能。
他的观点是 test automation 才是 single source of truth,任何文档都不如 executable spec 可靠。dotey 补充,测试覆盖到位后,可以偷懒的方式是把需求文档丢给 agent,或把需求描述清楚,让 agent 根据需求倒推出大部分可执行测试。
确实,必要的自动化测试覆盖是基本的 executable spec,如果人认真写当然最好,偷懒一点的话,把需求文档扔给 agent,或者说描述清楚,根据需求文档就能倒推个七七八八 https://t...
确实,必要的自动化测试覆盖是基本的 executable spec,如果人认真写当然最好,偷懒一点的话,把需求文档扔给 agent,或者说描述清楚,根据需求文档就能倒推个七七八八 x.com/geniusvczh/sta… geniusvczh @geniusvczh CI里面没有足够的regression test第二步也是没有用的,没有任何agent能确保新的东西不会break了旧的。归根结底还是test automation is the single source of truth,任何文档都不如executable spec🤪 🔗 View Quoted Tweet📊 1 ⚡
This report is categorized under AITOP's "How-to" desk, focusing on China's AI industry and domestic foundation model ecosystem. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include AI coding, Claude Code, Cursor, automated testing.
Source attribution: curated from 宝玉 (@dotey).