Large language models (LLMs) show promise for automated test generation, but most approaches target unit tests with mocked dependencies. Low-level integration testing instead exercises a class with its real, in-project dependencies, exposing faults involving object construction, API call sequences, and component interactions. Generating such tests is challenging because LLMs may lack project-specific knowledge (not knowing) or violate provided constraints (not following). We present IntTestGen, an LLM-based approach that combines context-enriched generation with constraint-enforced fixing. It mines dependency usage patterns from project code to guide test generation, then applies symbol-, protocol-, and iteration-level constraints during repair using a ClassIndex, a Markov typestate model, and experience memory. We evaluate IntTestGen against the state-of-the-art LLM-based baseline PANTA and search-based baseline EvoSuite on Defects4J and Deps4J, a new post-cutoff benchmark of recent Java repositories. Across the two benchmarks, IntTestGen improves line coverage by 19.99 and 22.69 percentage points, branch coverage by 24.90 and 15.78 points, and mutation score by 13.67 and 0.17 points, respectively. It also covers 378 and 55 additional lines of dependency code. Ablation results confirm that all major components contribute to performance.


翻译:暂无翻译

0
下载
关闭预览

相关内容

Integration:Integration, the VLSI Journal。 Explanation:集成,VLSI杂志。 Publisher:Elsevier。 SIT:http://dblp.uni-trier.de/db/journals/integration/
迈向LLM时代的可泛化评估:超越基准的综述
专知会员服务
23+阅读 · 2025年4月29日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
哈工大讯飞联合实验室发布中文XLNet预训练模型
哈工大SCIR
13+阅读 · 2019年8月20日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
推荐|上交大推出Texygen:文本生成模型的基准测试平台
深度学习基础之LSTM
全球人工智能
29+阅读 · 2017年12月18日
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
受限仓库多智能体取送中的动态安全等待点选择
《国防技术管理》印度智库报告最新45页
专知会员服务
3+阅读 · 8月28日
《美陆军最新条令:保障行动》
专知会员服务
4+阅读 · 8月28日
算法战场:人工智能如何重新定义军事力量
专知会员服务
6+阅读 · 8月28日
《北约联邦式电子战云架构》
专知会员服务
6+阅读 · 8月27日
《美陆军野战手册:空域管理战术》
专知会员服务
10+阅读 · 8月27日
相关基金
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员