ACM Transactions on Software Engineering and Methodology· 2026Q1
Gerçek Dünya Fonksiyonlarından Birim Testi Üretimi için LLM'lerin Kıyaslanması
Benchmarking LLMs for Unit Test Generation from Real-World Functions
- 29atıf
- Q1SCImago
- 2026yıl
Kısa özet
Gerçek dünya Python fonksiyonları için tasarlanmış yeni bir kıyaslama aracı olan ULT, en gelişmiş LLM'lerin birim testi üretiminde mevcut kıyaslama araçlarına kıyasla önemli ölçüde daha düşük performans (örneğin, %41,32 doğruluk) gösterdiğini ortaya koyuyor, bu da mevcut değerlendirmelerin yeteneklerini abartabileceğini gösteriyor.
Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.
Ana noktalar
- Yüksek döngüsel karmaşıklığa sahip gerçek dünya Python fonksiyonları için LLM birim testi üretimi kıyaslaması amacıyla yeni bir araç olan ULT tanıtıldı.
- ULT, önceki kıyaslama araçlarında bulunan veri kirliliği ve yapısal basitlik sorunlarını azaltır.
- LLM'ler, ULT üzerinde TestEval gibi mevcut kıyaslama araçlarına kıyasla önemli ölçüde daha düşük performans (örneğin, %41,32 doğruluk) elde etti.
- ULT, LLM kod üretimi ve test üretimi performansı arasında daha güçlü bir korelasyon (0,79) göstererek daha iyi genelleme ölçümü sağladığını göstermektedir.
Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.
Özet (abstract)
Recently, large language models (LLMs) have shown great promise in automating unit test generation, significantly reducing the manual effort required by developers. To effectively evaluate the capabilities of LLMs in this domain, it is crucial to have a well-designed benchmark that accurately reflects real-world scenarios and mitigates common pitfalls. Existing LLM test generation benchmarks are limited by two critical drawbacks: data contamination and structurally simple function code. As a result, scientific conclusions drawn from empirical studies using these benchmarks may be compromised. The evidence presented may be biased due to contamination and may fail to generalize beyond toy programs due to structural simplicity. To address these problems, we introduce ULT (UnLeakedTestbench), a new benchmark specifically designed for function-level unit test generation from real-world Python functions. ULT is constructed through a multi-stage curation process that ensures high cyclomatic complexity and mitigates test case contamination. With 3,909 carefully selected function-level tasks, ULT provides a more realistic and challenging evaluation of LLMs’ test generation capabilities. We also provide PLT (PreLeakedTestbench), a pair of ULT benchmarks with leaked tests designed to enable a controlled analysis of memorization versus reasoning in test generation. Based on the two datasets, we conduct a large-scale empirical study involving 12 state-of-the-art LLMs, comparing their performance against established benchmarks. Our evaluation results demonstrate that ULT is significantly more challenging. For example, test cases generated by LLMs only achieve 41.32%, 45.10%, 30.22%, and 40.21% for accuracy, statement coverage, branch coverage, and mutation score on average for all LLMs, respectively. These results are substantially lower than the corresponding metrics on TestEval (91.79%, 92.18%, 82.04%, and 49.69%) and PLT (47.07%, 55.13%, 40.07%, and 50.80%). In addition, different from existing benchmarks, ULT shows a strong correlation between test generation performance and code generation performance. For example, the correlation coefficient between the coding ability and test generation performance ( \(Pass@1\) ) on ULT is 0.79 (p = 0.002), while it is only 0.56 (p = 0.059) and 0.52 (p = 0.080) on TestEval and PLT, respectively. This indicates that ULT more effectively measures the generalization ability of LLMs. We also make ULT and evaluation results publicly available to foster further research (To preserve the integrity of the benchmark and prevent test case leakage into future LLM training sets, we do not release the ground-truth tests. Instead, we provide the complete evaluation results for all models benchmarked in this article. This allows researchers to compare new models against our findings without compromising the benchmark). ULT is available at https://github.com/huangd1999/UnLeakedTestBench .
Yazarların özeti; kaynağından alınmıştır. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗
Ü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 etGoogle ya da Apple hesabınla giriş; kart istemez. Bu makaleye geri dönersin.
Telefonda:
Alan: Yazılım
SoftwareComputer Science