Static Analysis and LLM for Comprehensive Java Unit Test Generation

Software testing is crucial in ensuring the reliability and correctness of software applications. However, generating comprehensive test cases manually can be time-consuming and error-prone. This paper introduces SAGEN, a tool designed to automate Java unit test generation by leveraging static analysis of Syntax Trees (AST) and large language models (LLMs). SAGEN identifies literal values and their ranges, generating test cases that improve coverage and quality. In our experiments, SAGEN outperforms traditional test case generation tools such as EvoSuite and Randoop. It demonstrates a $10 \%$ improvement in code coverage and a $13 \%$ enhancement in test case quality. Furthermore, SAGEN achieves a compile pass rate of $89.7 \%$, proving its effectiveness in producing both high-quality and reliable test cases.

Authors

Institutions

Publication Details

Published
2025-05-09
DOI
https://doi.org/10.1109/aemcse65292.2025.11042526
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Static Analysis and LLM for Comprehensive Java Unit Test Generation

Wei Wei
Software Testing and Debugging Techniques
article

Static Analysis and LLM for Comprehensive Java Unit Test Generation

Wei Wei
article en

Abstract

Software testing is crucial in ensuring the reliability and correctness of software applications. However, generating comprehensive test cases manually can be time-consuming and error-prone. This paper introduces SAGEN, a tool designed to automate Java unit test generation by leveraging static analysis of Syntax Trees (AST) and large language models (LLMs). SAGEN identifies literal values and their ranges, generating test cases that improve coverage and quality. In our experiments, SAGEN outperforms traditional test case generation tools such as EvoSuite and Randoop. It demonstrates a $10 \%$ improvement in code coverage and a $13 \%$ enhancement in test case quality. Furthermore, SAGEN achieves a compile pass rate of $89.7 \%$, proving its effectiveness in producing both high-quality and reliable test cases.

Beijing Institute of Technology (CN)
Openalex Percentile: Top 84%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Static Analysis and LLM for Comprehensive Java Unit Test Generation — Wei Wei · (2025) | TGRS Research Map | TGRS