CITYWALK: Enhancing LLM-Based C++ Unit Test Generation via Project-Dependency Awareness and Language-Specific Knowledge
This program is tentative and subject to change.
Unit testing plays a pivotal role in the software development lifecycle, as it ensures code quality. However, writing high-quality unit tests remains a time-consuming task for developers in practice. More recently, the application of large language models (LLMs) in automated unit test generation has demonstrated promising results. Existing approaches primarily focus on interpreted programming languages (e.g., Java), while mature solutions tailored to compiled programming languages like C++ are yet to be explored. The intricate language features of C++, such as pointers, templates, and virtual functions, pose particular challenges for LLMs in generating both executable and high-coverage unit tests. To tackle the aforementioned problems, this paper introduces CITYWALK, a novel LLM-based framework for C++ unit test generation. CITYWALK enhances LLMs by providing a comprehensive understanding of the dependency relationships within the project under test via program analysis. Furthermore, CITYWALK incorporates language-specific knowledge about C++ derived from project documentation and empirical observations, significantly improving the correctness of the LLM-generated unit tests. We implement CITYWALK by employing the widely popular LLM GPT-4o. The experimental results show that CITYWALK outperforms current state-of-the-art approaches on a collection of ten popular C++ projects. Our findings demonstrate the effectiveness of CITYWALK in generating high-quality C++ unit tests.
This program is tentative and subject to change.
Fri 17 AprDisplayed time zone: Brasilia, Distrito Federal, Brazil change
14:00 - 15:30 | Testing and Analysis 18New Ideas and Emerging Results (NIER) / Demonstrations / Journal-first Papers at Oceania IX Chair(s): Andy Zaidman TU Delft | ||
14:00 15mTalk | Drivora: A Unified and Extensible Infrastructure for Search-based Autonomous Driving Testing Demonstrations Mingfei Cheng Singapore Management University, Lionel Briand University of Ottawa, Canada; Lero centre, University of Limerick, Ireland, Yuan Zhou Zhejiang Sci-Tech University | ||
14:15 15mTalk | CITYWALK: Enhancing LLM-Based C++ Unit Test Generation via Project-Dependency Awareness and Language-Specific Knowledge Journal-first Papers Yuwei Zhang Institute of Software Chinese Academy of Sciences, Qingyuan Lu Institute of Software Chinese Academy of Sciences, Kai Liu Shanghai Stock Exchange Technology Co., Ltd., Wensheng Dou Institute of Software Chinese Academy of Sciences, Jiaxin Zhu Institute of Software at Chinese Academy of Sciences, Li Qian Shanghai Stock Exchange Technology Co., Ltd., Chunxi Zhang Shanghai Stock Exchange Technology Co., Ltd., Zheng Lin Shanghai Stock Exchange Technology Co., Ltd., Jun Wei Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences | ||
14:30 15mTalk | How Toxic Can You Get? Search-Based Toxicity Testing for Large Language Models Journal-first Papers Simone Corbo Politecnico di Milano, Luca Bancale Politecnico di Milano, Valeria De Gennaro Politecnico di Milano, Livia Lestingi DEIB, Politecnico di Milano, Vincenzo Scotti Karlsruhe Institute of Technology, Matteo Camilli Politecnico di Milano | ||
14:45 15mTalk | Using Cooperative Co-evolutionary Search to Generate Metamorphic Test Cases for Autonomous Driving Systems Journal-first Papers Hossein Yousefizadeh University of Ottawa, Shenghui Gu University of Ottawa, Lionel Briand University of Ottawa, Canada; Lero centre, University of Limerick, Ireland, Ali Nasr Waterloo Research Center of Huawei | ||
15:00 15mTalk | Atomicity Violation Detection for Interrupt-Driven Programs via Incrementally Exploring Concurrent Paths New Ideas and Emerging Results (NIER) | ||
15:15 15mTalk | EVATest: Domain-Oriented Android GUI Testing based on Reward-Guided Retrieval-Augmented Generation New Ideas and Emerging Results (NIER) Bhavana Kondeti The University of Texas at San Antonio, Guanqun Yang Stevens Institute of Technology, USA, Yui Takashima The University of Texas at San Antonio, XUEQING Liu Stevens Institute of Technology, Xiaoyin Wang University of Texas at San Antonio | ||