Good Papers
IEEE/ACM International Conference on Software Engineering (ICSE) 2023Code generationU British ColumbiaMicrosoft

CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models

CodaMosa uses Codex to generate seed tests for uncovered functions when SBST stalls, boosting coverage over both SBST and LLM-only baselines on most benchmarks.

Caroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha Sen

Published May 1, 2023296 citationsPaper ↗

86%
OverallMust read
?
OverallMust readVote to see the score
Readers
–

Only vote on papers you've read. Sign in to vote.

AI panel14/21reviewers recommend it
lenient 3/5
medium 8/11
strict 3/5
AI panel?Vote to see what the 20 AI reviewers said

Abstract

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.