Automatic Generation of Test Cases based on Bug Reports: a Feasibility Study with Large Language Models
Laura Plein, Wendk\^uuni C. Ou\'edraogo, Jacques Klein, Tegawend\'e F., Bissyand\'e

TL;DR
This study explores using large language models to generate executable test cases from bug reports, demonstrating that up to 50% of bugs can be addressed, aiding fault localization and patch validation.
Contribution
It introduces a novel approach leveraging LLMs to generate realistic test cases directly from bug reports, bridging a gap in automated test generation.
Findings
ChatGPT can generate executable test cases for up to 50% of Defects4J bugs.
Bug reports can effectively serve as natural inputs for test case generation.
Generated test cases are useful for fault localization and patch validation.
Abstract
Software testing is a core discipline in software engineering where a large array of research results has been produced, notably in the area of automatic test generation. Because existing approaches produce test cases that either can be qualified as simple (e.g. unit tests) or that require precise specifications, most testing procedures still rely on test cases written by humans to form test suites. Such test suites, however, are incomplete: they only cover parts of the project or they are produced after the bug is fixed. Yet, several research challenges, such as automatic program repair, and practitioner processes, build on the assumption that available test suites are sufficient. There is thus a need to break existing barriers in automatic test case generation. While prior work largely focused on random unit testing inputs, we propose to consider generating test cases that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software Engineering Techniques and Practices
