PofoliaGünlük literatür takibi

ACM Transactions on Software Engineering and Methodology· 2026Q1

Halüsinasyondan Mutabakata: Uçtan Uca JUnit Test Üretimi İçin Çoklu Ajan LLM'leri

Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation

Qinghua Xu, Guancheng Wang, Lionel Briand, Kui Liu

Kısa özet

CANDOR, yeni bir komut mühendisliği tabanlı LLM çerçevesi, halüsinasyonları azaltmak ve oracle doğruluğunu iyileştirmek için akıl yürüten LLM'ler arasında mutabakat sağlayarak, birden fazla özel LLM ajanını koordine ederek Java için eksiksiz JUnit testleri üretir.

Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.

Ana noktalar

  • CANDOR, Java için otomatik JUnit test üretimi için uçtan uca, komut mühendisliği tabanlı bir LLM çerçevesidir.
  • Test önekleri ve oracle'ları işbirlikçi bir şekilde üretmek için birden fazla özel LLM ajanı kullanır.
  • Akıl yürüten LLM'ler arasındaki yeni bir mutabakat stratejisi, halüsinasyonları azaltır ve oracle doğruluğunu artırır.
  • CANDOR, EvoSuite ile karşılaştırılabilir kod kapsamı ve üstün mutasyon puanları elde eder.
  • Oracle doğruluğunda en gelişmiş ince ayar tabanlı oracle üreteçlerini en az %21,1 oranında geride bırakır.

Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.

Özet (abstract)

Unit testing plays a critical role in ensuring software correctness. However, writing unit tests manually is labor-intensive, especially for strongly typed languages like Java, motivating the need for automated approaches. Traditional methods primarily rely on search-based or randomized algorithms to generate tests that achieve high code coverage and produce regression oracles, which are assertions derived from the program’s current behavior rather than its intended functionality. Recent advances in Large Language Models (LLMs) have enabled oracle generation from natural language descriptions, aligning better with user requirements. However, existing LLM-based methods often require LLM fine-tuning or rely on external tools such as EvoSuite for test prefix generation, making them costly or cumbersome to apply in practice. In this work, we propose CANDOR, a novel end-to-end, prompt engineering-based LLM framework for automated unit test generation in Java. CANDOR orchestrates multiple specialized LLM agents to collaboratively generate complete JUnit tests, including both high-quality test prefixes and accurate oracles. To mitigate the notorious hallucinations in LLMs and improve oracle correctness, we introduce a novel strategy that engages multiple reasoning LLMs in a panel discussion and generates accurate oracles based on consensus. Additionally, to reduce the verbosity of reasoning LLMs’ outputs, we propose a novel dual-LLM pipeline to produce concise and structured oracle evaluations. Our experiments on the HumanEvalJava and more complex LeetCodeJava datasets show that CANDOR is comparable with EvoSuite in generating tests with high code coverage and clearly superior in terms of mutation score. Moreover, our prompt engineering-based approach CANDOR significantly outperforms the state-of-the-art, fine-tuning-based oracle generator TOGLL by at least 21.1 percentage points in oracle correctness on both correct and faulty source code. Further ablation studies confirm the critical contributions of key agents in improving test prefix quality and oracle accuracy.

Yazarların özeti; kaynağından alınmıştır. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗

ÇıkarımlarPremium Makaleye SorÜcretsiz hesapla

Ücretsiz hesapla devam et

Makaleye Sor ile bu makaleye günde 5 soru ücretsiz; makaleyi kaydet, kaynakçasını al, ilgi alanına göre her gün yeni özetler. Çıkarımlar Premium.

Web'de ücretsiz devam et

Google ya da Apple hesabınla giriş; kart istemez. Bu makaleye geri dönersin.

Telefonda:

Alan: Yazılım

SoftwareComputer Science