Lune

ICSE2026顶会

LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation

Gwihwan Go, Quan Zhang, Chijin Zhou, Zhao Wei, Yu Jiang

2026年份
2被引次数

摘要

Automated unit test generation is essential for robust software development, yet existing approaches struggle to generalize across multiple programming languages and operate within real-time development. While Large Language Models (LLMs) offer a promising solution, their ability to generate high coverage test code depends on prompting a concise context of the focal method. Current solutions, such as Retrieval-Augmented Generation, either rely on imprecise similarity-based searches or demand the creation of costly, language-specific static analysis pipelines. To address this gap, we present LspRag, a framework for concise-context retrieval tailored for real-time, language-agnostic unit test generation. LspRag leverages off-the-shelf Language Server Protocol (LSP) back-ends to supply LLMs with precise symbol definitions and references in real time. By reusing mature LSP servers, LspRag provides an LLM with language-aware context retrieval, requiring minimal per-language engineering effort. We evaluated LspRag on open-source projects spanning Java, Go, and Python. Compared to the best performance of baselines, LspRag increased line coverage by up to 174.55% for Golang, 213.31% for Java, and 31.57% for Python.

• Software and its engineering → Software testing and debugging; • Computing methodologies → Neural networks; Natural language processing.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

它引用的顶会 Paper20

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖