一句话:定义加固测试与捕获测试,提出即时捕获测试生成挑战,并梳理基于 LLM 软件测试的开放问题。
尽管自动化软件测试已有数十年研究,但加固测试与捕获测试等基础概念仍缺乏精确定义,这限制了大语言模型(LLM)生成测试的潜力。本文形式化定义并研究两类测试:加固测试旨在防范未来回归,捕获测试旨在发现代码变更引入的缺陷或回归,且加固测试未来可能转化为捕获测试。作者提出“即时捕获”(JiTTest)挑战,要求在故障进入生产前即时生成测试,并指出该方案也可用于发现遗留代码中的潜在缺陷。文章枚举可能结果,讨论部署选项与开放研究问题,并汇报 Meta 在基于 LLM 自动加固测试上的初步结果。
Despite decades of research and practice in automated software testing, several fundamental concepts remain ill-defined and under-explored, yet offer enormous potential real-world impact. We show that these concepts raise exciting new challenges in the context of Large Language Models for software test generation. More specifically, we formally define and investigate the properties of hardening and catching tests. A hardening test is one that seeks to protect against future regressions, while a catching test is one that catches such a regression or a fault in new functionality introduced by a code change. Hardening tests can be generated at any time and may become catching tests when a future regression is caught. We also define and motivate the Catching 'Just-in-Time' (JiTTest) Challenge, in which tests are generated 'just-in-time' to catch new faults before they land into production. We show that any solution to Catching JiTTest generation can also be repurposed to catch latent faults in legacy code. We enumerate possible outcomes for hardening and catching tests and JiTTests, and discuss open research problems, deployment options, and initial results from our work on automated LLM-based hardening at Meta. This paper1 was written to accompany the keynote by the authors at the ACM International Conference on the Foundations of Software Engineering (FSE) 2025.