Lune

FSE2021Top-tier venue

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models cites Recovering fitness gradients for interprocedural Boolean flags in search-based testing
  • Recovering fitness gradients for interprocedural Boolean flags in search-based testing cites Typestate-guided fuzzer for discovering use-after-free vulnerabilities
  • Recovering fitness gradients for interprocedural Boolean flags in search-based testing cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • RegMiner: towards constructing a large regression dataset from code evolution history cites Recovering fitness gradients for interprocedural Boolean flags in search-based testing
  • RegMiner: towards constructing a large regression dataset from code evolution history cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • MemLock: memory usage guided fuzzing cites Typestate-guided fuzzer for discovering use-after-free vulnerabilities
  • Typestate-guided fuzzer for discovering use-after-free vulnerabilities cites MemLock: memory usage guided fuzzing
  • MemLock: memory usage guided fuzzing cites Hawkeye: Towards a Desired Directed Grey-box Fuzzer
  • Typestate-guided fuzzer for discovering use-after-free vulnerabilities cites Hawkeye: Towards a Desired Directed Grey-box Fuzzer
  • Generating Project-Specific Test Cases with Requirement Validation Intention cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • Generating Project-Specific Test Cases with Requirement Validation Intention cites Recovering fitness gradients for interprocedural Boolean flags in search-based testing
  • Selectively Combining Multiple Coverage Goals in Search-Based Unit Test Generation cites Recovering fitness gradients for interprocedural Boolean flags in search-based testing
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. 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
  2. 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
  3. Selectively Combining Multiple Coverage Goals in Search-Based Unit Test GenerationZhichao Zhou, Yuming Zhou, Chunrong Fang, Zhenyu Chen et al.ASE 2022 · 8 citations
  4. API-Knowledge Aware Search-Based Software Testing: Where, What, and HowXiaoxue Ren, Xinyuan Ye, Yun Lin, Zhenchang Xing et al.FSE 2023 · 4 citations
  5. Generating Project-Specific Test Cases with Requirement Validation IntentionBinhang Qi, Yun Lin, Xinyi Weng, Yuhuan Huang et al.ISSTA 2026 · 3 citations

Builds on7

  1. Hawkeye: Towards a Desired Directed Grey-box FuzzerHongxu Chen, Yinxing Xue, Yuekang Li, Bihuan Chen et al.CCS 2018 · 335 citations
  2. sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin et al.ICSE 2020 · 260 citations
  3. MemLock: memory usage guided fuzzingCheng Wen, Haijun Wang, Yuekang Li, Shengchao Qin et al.ICSE 2020 · 116 citations
  4. Typestate-guided fuzzer for discovering use-after-free vulnerabilitiesHaijun Wang, Xiaofei Xie, Yi Li, Cheng Wen et al.ICSE 2020 · 107 citations
  5. 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

  1. 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
  2. Defect Prediction Guided Search-Based Software TestingAnjana Perera, Aldeida Aleti, Marcel Böhme, Burak TurhanASE 2020 · 16 citations
  3. Automatic Unit Test Generation for Machine Learning Libraries: How Far Are We?Song Wang, Nishtha Shrestha, Abarna Kucheri Subburaman, Junjie Wang et al.ICSE 2021 · 36 citations
  4. HITS: High-coverage LLM-based Unit Test Generation via Method SlicingZejun Wang, Kaibo Liu, Ge Li, Zhi JinASE 2024 · 29 citations
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines