Uncovering Business Logic Bugs via Semantics-Driven Unit Test Generation (Experience Paper)
摘要
Business logic bugs violate intended business semantics and are particularly prevalent in enterprise software. Yet most existing unit test generation techniques are code-centric, making such bugs difficult to expose. We present SeGa, a semantics-driven unit test generation technique for uncovering business logic bugs. SeGa constructs a semantic knowledge base from product requirement documents, represented as a set of functionality entries that group related requirements under a common business intent. Given a focal method, SeGa retrieves the relevant functionality entries and derives fine-grained business scenarios with explicit preconditions, triggering actions, expected outcomes, and semantic constraints to guide LLM-based test generation. We evaluate SeGa on four industrial Go projects containing 60 real-world business logic bugs. SeGa detects 22∼25 more bugs than four state-of-the-art LLM-based techniques and improves precision by 26.9%∼34.3%. Deployment across 6 production repositories further uncovers 16 previously unknown business logic bugs that were confirmed and fixed by developers, demonstrating SeGa's practical value. From our industrial study, we summarize a series of lessons and suggestions for practical use and future research.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models 引用了 TOGA: A Neural Method for Test Oracle Generation
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
- Context Matters: Improving the Practical Reliability of LLM-Based Unit Test Generation (Experience Paper) 引用了 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
- Context Matters: Improving the Practical Reliability of LLM-Based Unit Test Generation (Experience Paper) 引用了 TOGA: A Neural Method for Test Oracle Generation
- Context Matters: Improving the Practical Reliability of LLM-Based Unit Test Generation (Experience Paper) 引用了 On the Evaluation of Large Language Models in Unit Test Generation
- Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM 引用了 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
- Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM 引用了 TOGA: A Neural Method for Test Oracle Generation
- On the Evaluation of Large Language Models in Unit Test Generation 引用了 CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
- On the Evaluation of Large Language Models in Unit Test Generation 引用了 TOGA: A Neural Method for Test Oracle Generation
引用它的顶会 Paper1
它引用的 Paper18
- CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language ModelsCaroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha SenICSE 2023 · 221 次引用
- Fuzz4All: Universal Fuzzing with Large Language ModelsChunqiu Steven Xia, Matteo Paltenghi, Jia Le Tian, Michael Pradel 等ICSE 2024 · 155 次引用
- TOGA: A Neural Method for Test Oracle GenerationElizabeth Dinella, Gabriel Ryan, Todd Mytkowicz, Shuvendu K. LahiriICSE 2022 · 92 次引用
- Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLMGabriel Ryan, Siddhartha Jain, Mingyue Shang, Shiqi Wang 等FSE 2024 · 68 次引用
- On the Evaluation of Large Language Models in Unit Test GenerationLin Yang, Chen Yang, Shutao Gao, Weijing Wang 等ASE 2024 · 42 次引用
相关 Paper
- INTENTFIX: Automated Logic Vulnerability Repair via LLM-Driven Intent ModelingJinseok Heo, Dongwook Choi, Jinyoung Kim, Misoo Kim 等ICSE 2026
- LLM-Powered Test Case Generation for Detecting Bugs in Plausible ProgramsKaibo Liu, Zhenpeng Chen, Yiyang Liu, Jie M. Zhang 等ACL 2025 · 20 次引用
- A Knowledge Enhanced Large Language Model for Bug LocalizationYue Li, Bohan Liu, Ting Zhang, Zhiqi Wang 等FSE 2025 · 3 次引用
- Enhancing Exploratory Testing by Large Language Model and Knowledge GraphYanqi Su, Dianshu Liao, Zhenchang Xing, Qing Huang 等ICSE 2024 · 19 次引用
- Measuring the Influence of Incorrect Code on Test GenerationDong Huang, Jie M. Zhang, Mark Harman, Mingzhe Du 等ICSE 2026
