paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Tool for Generating Exceptional Behavior Tests With Large Language Models

基于大语言模型的异常行为测试生成工具
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 4/10 · 论文属于 LLM 辅助软件测试/测试生成,与用户关注的“LLM 改进静态分析/形式化验证”仅在 LLM+程序语言大方向相邻;它不涉及静态分析、浮点程序分析或贝叶斯程序分析,也不是针对 Agentic/ML 系统程序的分析。引用 1 inbox
Linghan Zhong, Samuel Yuan, Jiyang Zhang, Yu Liu, Pengyu Nie, Junyi Jessy Li, Milos Gligoric
crossref: 2026-09-12

AI 速览

一句话:提出 exLong,利用微调 CodeLlama 自动生成异常行为测试,辅助开发者补充异常场景测试。

异常行为测试(EBTs)对于验证代码正确处理意外事件并抛出适当异常至关重要。然而,开发者往往优先测试“快乐路径”,忽视异常场景。本文提出 exLong,一个自动生成 EBTs 的工具。exLong 利用从 CodeLlama 微调的大语言模型(LLM),并融合了对异常抛出轨迹、守卫抛出语句的条件表达式以及执行类似轨迹的非异常行为测试的推理。通过演示视频,论文展示了 exLong 如何有效辅助开发者为其项目创建全面的 EBTs。工具可在线获取。

问题
开发者常优先测试正常路径而忽视异常场景,异常行为测试(EBTs)的创建缺乏自动化支持。
方法
exLong 基于微调的 CodeLlama 大语言模型,结合异常抛出轨迹、守卫抛出语句的条件表达式以及类似轨迹的非异常测试进行推理,自动生成 EBTs。
评估
通过演示视频展示 exLong 如何辅助开发者创建全面的 EBTs(摘要未报告定量评估)。
原文摘要(Abstract)

Exceptional behavior tests (EBTs) are crucial in software development for verifying that code correctly handles unwanted events and throws appropriate exceptions. However, prior research has shown that developers often prioritize testing "happy paths", i.e., paths without unwanted events, over exceptional scenarios. We present exLong, a tool that automatically generates EBTs to address this gap. exLong leverages a large language model (LLM) fine-tuned from CodeLlama and incorporates reasoning about exception-throwing traces, conditional expressions that guard throw statements, and non-exceptional behavior tests that execute similar traces. Our demonstration video illustrates how exLong can effectively assist developers in creating comprehensive EBTs for their project (available at https://youtu.be/Jro8kMgplZk).

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8989,
  title = {A Tool for Generating Exceptional Behavior Tests With Large Language Models},
  author = {Linghan Zhong and Samuel Yuan and Jiyang Zhang and Yu Liu and Pengyu Nie and Junyi Jessy Li and Milos Gligoric},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728608}
}