Generating key points…
Answers are grounded in this paper and cite their sources.
Large language models (LLMs) can write readable unit tests, but most test generators that use them rely on large hosted models, and feedback loops designed for such models help little when only a small local model can be used. This paper presents CAMEO (Context-Aware, Mutation- and Execution-guided Optimisation), a framework that treats unit test generation as the maximisation of one coverage-and-mutation objective under a budget of model calls. The objective is monotone submodular, which yields approximation guarantees for selecting the final suite. CAMEO combines a context-aware first prompt, oracles taken from execution, goal-structured feedback that ranks open targets by a Bayesian posterior expected gain, a search stage that mutates valid inputs within invariants inferred from the model’s own tests, and objective-preserving suite selection. CAMEO was evaluated with Qwen2.5-Coder-0.5B on a CPU, using 332 programs from HumanEval, with human-written bugs from HumanEvalFix, and TestEval, against five re-implemented LLM-based strategies under the same budget of three calls. CAMEO reached the highest mean mutation score on held-out mutants (0.776) and detected the most bugs (94.8%). It was significantly better than Repair, CoverUp-style, MuTAP-style and SymPrompt-style prompting, and it matched basic sampling while using 2.24 calls on average. After one call, its TestEval branch coverage was 0.768 against 0.677, and on TestEval runs where every method produced a valid test it raised branch coverage from 0.909 to 0.967. Selection shortened the suites by about two thirds without losing coverage. The results show that small models benefit most from execution feedback, cheap search and single-goal prompts.
No takes yet. Share an insight, caveat, or question.
Janan Farag Yonan (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: