Graph-based seed object synthesis for search-based unit testing
Yun Lin, You Sheng Ong, Jun Sun, Gordon Fraser, Jin Song Dong
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models 引用了 Recovering fitness gradients for interprocedural Boolean flags in search-based testing
- Recovering fitness gradients for interprocedural Boolean flags in search-based testing 引用了 Typestate-guided fuzzer for discovering use-after-free vulnerabilities
- Recovering fitness gradients for interprocedural Boolean flags in search-based testing 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- RegMiner: towards constructing a large regression dataset from code evolution history 引用了 Recovering fitness gradients for interprocedural Boolean flags in search-based testing
- RegMiner: towards constructing a large regression dataset from code evolution history 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- MemLock: memory usage guided fuzzing 引用了 Typestate-guided fuzzer for discovering use-after-free vulnerabilities
- Typestate-guided fuzzer for discovering use-after-free vulnerabilities 引用了 MemLock: memory usage guided fuzzing
- MemLock: memory usage guided fuzzing 引用了 Hawkeye: Towards a Desired Directed Grey-box Fuzzer
- Typestate-guided fuzzer for discovering use-after-free vulnerabilities 引用了 Hawkeye: Towards a Desired Directed Grey-box Fuzzer
- Generating Project-Specific Test Cases with Requirement Validation Intention 引用了 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
- Generating Project-Specific Test Cases with Requirement Validation Intention 引用了 Recovering fitness gradients for interprocedural Boolean flags in search-based testing
- Selectively Combining Multiple Coverage Goals in Search-Based Unit Test Generation 引用了 Recovering fitness gradients for interprocedural Boolean flags in search-based testing
引用它的顶会 Paper16
- CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language ModelsCaroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha SenICSE 2023 · 221 次引用
- RegMiner: towards constructing a large regression dataset from code evolution historyXuezhi Song, Yun Lin, Siang Hwee Ng, Yijian Wu 等ISSTA 2022 · 11 次引用
- Selectively Combining Multiple Coverage Goals in Search-Based Unit Test GenerationZhichao Zhou, Yuming Zhou, Chunrong Fang, Zhenyu Chen 等ASE 2022 · 8 次引用
- API-Knowledge Aware Search-Based Software Testing: Where, What, and HowXiaoxue Ren, Xinyuan Ye, Yun Lin, Zhenchang Xing 等FSE 2023 · 4 次引用
- Generating Project-Specific Test Cases with Requirement Validation IntentionBinhang Qi, Yun Lin, Xinyi Weng, Yuhuan Huang 等ISSTA 2026 · 3 次引用
它引用的 Paper7
- Hawkeye: Towards a Desired Directed Grey-box FuzzerHongxu Chen, Yinxing Xue, Yuekang Li, Bihuan Chen 等CCS 2018 · 335 次引用
- sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin 等ICSE 2020 · 260 次引用
- MemLock: memory usage guided fuzzingCheng Wen, Haijun Wang, Yuekang Li, Shengchao Qin 等ICSE 2020 · 116 次引用
- Typestate-guided fuzzer for discovering use-after-free vulnerabilitiesHaijun Wang, Xiaofei Xie, Yi Li, Cheng Wen 等ICSE 2020 · 107 次引用
- Recovering fitness gradients for interprocedural Boolean flags in search-based testingYun Lin, Jun Sun, Gordon Fraser, Ziheng Xiu 等ISSTA 2020 · 25 次引用
相关 Paper
- Increasing the Effectiveness of Automatically Generated Tests by Improving Class ObservabilityGeraldine Galindo-Gutierrez, Juan Pablo Sandoval Alcocer, Nicolas Jimenez-Fuentes, Alexandre Bergel 等ICSE 2025 · 1 次引用
- Defect Prediction Guided Search-Based Software TestingAnjana Perera, Aldeida Aleti, Marcel Böhme, Burak TurhanASE 2020 · 16 次引用
- Automatic Unit Test Generation for Machine Learning Libraries: How Far Are We?Song Wang, Nishtha Shrestha, Abarna Kucheri Subburaman, Junjie Wang 等ICSE 2021 · 36 次引用
- HITS: High-coverage LLM-based Unit Test Generation via Method SlicingZejun Wang, Kaibo Liu, Ge Li, Zhi JinASE 2024 · 29 次引用
- June: A Type Testability Transformation for Improved ATG PerformanceDan Bruce, David A. Kelly, Héctor D. Menéndez, Earl T. Barr 等ISSTA 2023 · 1 次引用
