Less is More: On the Importance of Data Quality for Unit Test Generation
Unit testing is crucial for software development and maintenance. Effective unit testing ensures and improves software quality, but writing unit tests is time-consuming and labor-intensive. Recent studies have proposed deep learning (DL) techniques or large language models (LLMs) to automate unit test generation. These models are usually trained or fine-tuned on large-scale datasets. Despite growing awareness of the importance of data quality, there has been limited research on the quality of datasets used for test generation. To bridge this gap, we systematically examine the impact of noise on the performance of learning-based test generation models. We first apply the open card sorting method to analyze the most popular and largest test generation dataset, Methods2Test, to categorize eight distinct types of noise. Further, we conduct detailed interviews with 17 domain experts to validate and assess the importance, reasonableness, and correctness of the noise taxonomy. Then, we propose CleanTest, an automated noise-cleaning framework designed to improve the quality of test generation datasets. CleanTest comprises three filters: a rule-based syntax filter, a rule-based relevance filter, and a model-based coverage filter. To evaluate its effectiveness, we apply CleanTest on two widely-used test generation datasets, i.e., Methods2Test and Atlas. Our findings indicate that 43.52% and 29.65% of datasets contain noise, highlighting its prevalence. Finally, we conduct comparative experiments using four LLMs (i.e., CodeBERT, AthenaTest, StarCoder, and CodeLlama7B) to assess the impact of noise on test generation performance. The results show that filtering noise positively influences the test generation ability of the models. Fine-tuning the four LLMs with the filtered Methods2Test dataset, on average, improves its performance by 67% in branch coverage, using the Defects4J benchmark. For the Atlas dataset, the four LLMs improve branch coverage by 39%. Additionally, filtering noise improves bug detection performance, resulting in a 21.42% increase in bugs detected by the generated tests.
Mon 23 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:30 - 12:30 | Test GenerationResearch Papers / Industry Papers at Cosmos Hall Chair(s): Michael Pradel University of Stuttgart | ||
10:30 20mTalk | CoverUp: Effective High Coverage Test Generation for Python Research Papers Juan Altmayer Pizzorno University of Massachusetts Amherst, Emery D. Berger University of Massachusetts Amherst and Amazon Web Services DOI Pre-print | ||
11:00 20mTalk | Doc2OracLL: Investigating the Impact of Documentation on LLM-based Test Oracle Generation Research Papers Soneya Binta Hossain University of Virginia, Raygan Taylor Dillard University, Matthew B Dwyer University of Virginia DOI | ||
11:20 20mTalk | Less is More: On the Importance of Data Quality for Unit Test Generation Research Papers Junwei Zhang Zhejiang University, Xing Hu Zhejiang University, Shan Gao Huawei, Xin Xia Zhejiang University, David Lo Singapore Management University, Shanping Li Zhejiang University DOI | ||
11:40 20mTalk | Mutation-Guided LLM-based Test Generation at Meta Industry Papers Mark Harman Meta Platforms, Inc. and UCL, Jillian Ritchey Meta platforms, Inna Harper Meta, Shubho Sengupta Meta platforms, Ke Mao Meta, Abhishek Gulati Meta platforms, Christopher Foster Meta platforms, Hervé Robert Meta platforms | ||
12:00 10mTalk | LSPAI: An IDE Plugin for LLM-Powered Multi-Language Unit Test Generation with Language Server Protocol Industry Papers Gwihwan Go Tsinghua University, Chijin Zhou Tsinghua University, Quan Zhang Tsinghua University, Yu Jiang Tsinghua University, Zhao Wei Tencent | ||
12:10 20mTalk | Can Generative AI Produce Test Cases? An Experience from the Automotive Domain Industry Papers Stephen Wynn-Williams McMaster University, Canada, Ryan Tyrrell McMaster University, Vera Pantelic McMaster University, Mark Lawford McMaster University, Claudio Menghi University of Bergamo; McMaster University, Phaneendra Nalla FCA US LLC, Hassan Artail FCA US LLC |
This is the main event hall of Clarion Hotel, which will be used to host keynote talks and other plenary sessions. The FSE and ISSTA banquets will also happen in this room.
The room is just in front of the registration desk, on the other side of the main conference area. The large doors with numbers “1” and “2” provide access to the Cosmos Hall.