Large Language Models (LLMs) can generate plausible test code. Intuitively they generate this by imitating tests seen in their training data, rather than reasoning about execution semantics. However, such reasoning is important when applying mutation testing, where individual tests need to demonstrate differences in program behavior between a program and specific artificial defects (mutants). In this paper, we evaluate whether Scientific Debugging, which has been shown to help LLMs when debugging, can also help them to generate tests for mutants. In the resulting approach, LLMs form hypotheses about how to kill specific mutants, and then iteratively generate and refine tests until they succeed, all with detailed explanations for each step. We compare this method to three baselines: (1) directly asking the LLM to generate tests, (2) repeatedly querying the LLM when tests fail, and (3) search-based test generation with Pynguin. Our experiments evaluate these methods based on several factors, including mutation score, code coverage, success rate, and the ability to identify equivalent mutants. The results demonstrate that LLMs, although requiring higher computation cost, consistently outperform Pynguin in generating tests with better fault detection and coverage. Importantly, we observe that the iterative refinement of test cases is important for achieving high-quality test suites.
QBugs: A Collection of Reproducible Bugs in Quantum Algorithms and a Supporting Infrastructure to Enable Controlled Quantum Software Testing and Debugging Experiments
A semantic mutation metric for metamorphic relation adequacy in scientific computing programs
School of Computing, University of South China(南华大学计算机学院);Hunan Engineering Research Center of Software Evaluation and Testing for Intellectual Equipment(湖南软件测评与智能设备工程研究中心);CNNC Key Laboratory on High Trusted Computing(中核集团高可信计算重点实验室)
Minimalistic Terminal Editor for Julia Programming -- MinTEJ: A Friendly Approach for a Scientific Programmer
Hitachi Energy Technology Services Private Limited(日立能源技术服务私人有限公司);Indian Institute of Technology Bombay(印度孟买理工学院);Newcastle University in Singapore(新加坡纽卡斯尔大学)
Exploring the Potential and Limitations of Large Language Models for Novice Program Fault Localization
College of Information Science and Technology, Beijing University of Chemical Technology(北京化工大学信息科学与技术学院);College of Information Engineering, Beijing Institute of Petrochemical Technology(北京石油化工学院信息工程学院);School of Artificial Intelligence and Computer Science, Nantong University(南通大学人工智能与计算机科学学院)
Peking University Shenzhen Graduate School(北京大学深圳研究生院);Tsinghua-Peking Joint Center for Life Sciences(清华-北大生命科学联合中心);Tsinghua University(清华大学);Beijing Yuankong Intelligent Technology Co., Ltd.(北京元空智能科技有限公司)
OpenAI4S 基于“代码即行动,科学即会话”原则,通过持久化运行时和会话管理提升 AI 科学研究的可靠性,在 36 个场景中得分 7.83,优于通用编码框架。