Graph-based seed object synthesis for search-based unit testing
Yun Lin, You Sheng Ong, Jun Sun, Gordon Fraser, Jin Song Dong
Abstract
Search-based software testing (SBST) generates tests using search algorithms guided by measurements gauging how far a test case is away from exercising a coverage goal. The effectiveness of SBST largely depends on the continuity and monotonicity of the fitness landscape decided by these measurements and the search operators. Unfortunately, the fitness landscape is challenging when the function under test takes object inputs, as classical measurements hardly provide guidance for constructing legitimate object inputs. To overcome this problem, we propose test seeds, i.e., test code skeletons of legitimate objects which enable the use of classical measurements. Given a target branch in a function under test, we first statically analyze the function to build an object construction graph that captures the relation between the operands of the target method and the states of their relevant object inputs. Based on the graph, we synthesize test template code where each "slot" is a mutation point for the search algorithm. This approach can be seamlessly integrated with existing SBST algorithms, and we implemented EvoObj on top of the well-known EvoSuite unit test generation tool. Our experiments show that EvoObj outperforms EvoSuite with statistical significance on 2,750 methods taken from 103 open source Java projects using state-of-the-art SBST algorithms.
• Software and its engineering → Software testing and debugging; Search-based software engineering.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 9877b0ca-445d-4458-975d-1353cbd853a5Cited by top-tier papers16
- CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language ModelsCaroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha SenICSE 2023 · 221 citations
- RegMiner: towards constructing a large regression dataset from code evolution historyXuezhi Song, Yun Lin, Siang Hwee Ng, Yijian Wu et al.ISSTA 2022 · 11 citations
- Selectively Combining Multiple Coverage Goals in Search-Based Unit Test GenerationZhichao Zhou, Yuming Zhou, Chunrong Fang, Zhenyu Chen et al.ASE 2022 · 8 citations
- API-Knowledge Aware Search-Based Software Testing: Where, What, and HowXiaoxue Ren, Xinyuan Ye, Yun Lin, Zhenchang Xing et al.FSE 2023 · 4 citations
- Generating Project-Specific Test Cases with Requirement Validation IntentionBinhang Qi, Yun Lin, Xinyi Weng, Yuhuan Huang et al.ISSTA 2026 · 3 citations
Builds on7
- Hawkeye: Towards a Desired Directed Grey-box FuzzerHongxu Chen, Yinxing Xue, Yuekang Li, Bihuan Chen et al.CCS 2018 · 335 citations
- sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin et al.ICSE 2020 · 260 citations
- MemLock: memory usage guided fuzzingCheng Wen, Haijun Wang, Yuekang Li, Shengchao Qin et al.ICSE 2020 · 116 citations
- Typestate-guided fuzzer for discovering use-after-free vulnerabilitiesHaijun Wang, Xiaofei Xie, Yi Li, Cheng Wen et al.ICSE 2020 · 107 citations
- Recovering fitness gradients for interprocedural Boolean flags in search-based testingYun Lin, Jun Sun, Gordon Fraser, Ziheng Xiu et al.ISSTA 2020 · 25 citations
Related papers
- Increasing the Effectiveness of Automatically Generated Tests by Improving Class ObservabilityGeraldine Galindo-Gutierrez, Juan Pablo Sandoval Alcocer, Nicolas Jimenez-Fuentes, Alexandre Bergel et al.ICSE 2025 · 1 citation
- Defect Prediction Guided Search-Based Software TestingAnjana Perera, Aldeida Aleti, Marcel Böhme, Burak TurhanASE 2020 · 16 citations
- HITS: High-coverage LLM-based Unit Test Generation via Method SlicingZejun Wang, Kaibo Liu, Ge Li, Zhi JinASE 2024 · 29 citations
- June: A Type Testability Transformation for Improved ATG PerformanceDan Bruce, David A. Kelly, Héctor D. Menéndez, Earl T. Barr et al.ISSTA 2023 · 1 citation
- Leveraging Large Language Models for Enhancing the Understandability of Generated Unit TestsAmirhossein Deljouyi, Roham Koohestani, Maliheh Izadi, Andy ZaidmanICSE 2025 · 8 citations
