liu.seSearch for publications in DiVA
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Novel LLM Benchmark for Unit Test Generation
Linköping University, Department of Computer and Information Science.
2026 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

Software testing has always been an important part of software development. As long as software testing has existed, there have also been attempts to automate it. Nowadays, with the rise of Large Language Models (LLMs) in our daily lives, many attempts have been made to use them for test generation, especially for unit tests.

Despite the growing demand, there is still no benchmark specialized for industrial use that evaluates unit test generation in Java. This work aims to address this gap by creating an automated benchmark for unit test generation, which uses dynamic prompting techniques and five metrics to evaluate the performance of each LLM. It covers three difficulty levels (Simple, Complex, and Industry), which makes it applicable in an industry setting.

This benchmark was tested on four LLMs (DeepSeek-R1, Mistral-Nemo, Llama3, and Qwen2.5). The results show the effectiveness of dynamic prompting compared to static prompt templates. We also observe that, while models show promising results in the Simple and Complex categories, the results in the Industry category still have significant room for improvement.

Furthermore, the results demonstrate that the size of a model is not always correlated to its performance in this task, which highlights the importance of benchmarking.

Place, publisher, year, edition, pages
2026. , p. 88
Keywords [en]
Benchmark, unit test, LLM, AI, automation, pipeline, DSPy, prompt optimization, Java, testing
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:liu:diva-224286ISRN: LIU-IDA/LITH-EX-A--25/019--SEOAI: oai:DiVA.org:liu-224286DiVA, id: diva2:2062692
External cooperation
Ericsson
Subject / course
Computer science
Supervisors
Examiners
Available from: 2026-06-22 Created: 2026-05-26 Last updated: 2026-06-22Bibliographically approved

Open Access in DiVA

fulltext(789 kB)49 downloads
File information
File name FULLTEXT02.pdfFile size 789 kBChecksum SHA-512
b8dc48337182125002781747c73bf4996830e2142849d69f3216a1f7e952ee65e7a4d071058386334626a682ccde6457cc0651f3644d62b2a19de627d1137181
Type fulltextMimetype application/pdf

By organisation
Department of Computer and Information Science
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 49 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 215 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf