考试(生物学)
计算机科学
代码覆盖率
语言模型
人工智能
编码(集合论)
空格(标点符号)
机器学习
软件
测试用例
程序设计语言
操作系统
古生物学
回归分析
集合(抽象数据类型)
生物
作者
Caroline Lemieux,Jeevana Priya Inala,Shuvendu K. Lahiri,Siddhartha Sen
标识
DOI:10.1109/icse48619.2023.00085
摘要
Search-based software testing (SBST) generates high-coverage test cases for programs under test with a combination of test case generation and mutation. SBST's performance relies on there being a reasonable probability of generating test cases that exercise the core logic of the program under test. Given such test cases, SBST can then explore the space around them to exercise various parts of the program. This paper explores whether Large Language Models (LLMs) of code, such as OpenAI's Codex, can be used to help SBST's exploration. Our proposed algorithm, CodaMosa, conducts SBST until its coverage improvements stall, then asks Codex to provide example test cases for under-covered functions. These examples help SBST redirect its search to more useful areas of the search space. On an evaluation over 486 benchmarks, CodaMosa achieves statistically significantly higher coverage on many more benchmarks (173 and 279) than it reduces coverage on (10 and 4), compared to SBST and LLM-only baselines.
科研通智能强力驱动
Strongly Powered by AbleSci AI