Evaluating the effectiveness of class-level LLM-generated test suites in Python

πŸ“… 2026-09-21
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
η ”η©Άι€šθΏ‡δΈεŒζη€Ίη­–η•₯ε’Œζ¨‘εž‹ι€‰ζ‹©θ―„δΌ°LLMη”Ÿζˆηš„Pythonη±»ηΊ§ζ΅‹θ―•ε₯—δ»Άηš„ζœ‰ζ•ˆζ€§οΌŒδ½Ώη”¨ζ‰§θ‘Œη»“ζžœγ€θ¦†η›–ηŽ‡γ€ε˜εΌ‚ζ΅‹θ―•εΎ—εˆ†ε’Œη»“ζž„θ΄¨ι‡ζŒ‡ζ ‡θΏ›θ‘Œη»Όεˆθ―„δ»·γ€‚
πŸ“ Abstract
Context: Large language models (LLMs) can generate unit tests quickly, but high structural coverage does not establish that those tests execute reliably or detect faults. Existing evidence often treats coverage as the principal outcome and rarely compares prompt strategies and models through mutation testing at class level. Objective: This study examines how prompt strategy and model choice shape the executability, structural coverage, fault-detection effectiveness, and structural quality of LLM-generated Python test suites relative to human-written suites. Method: We evaluate multiple prompt strategies across a diverse set of current LLM configurations on the ClassEval benchmark. The evaluation combines execution outcomes, line and branch coverage, Cosmic Ray mutation scores, and structural quality indicators. Primary analyses treat successful execution as a prerequisite; paired comparisons use only classes shared by the relevant executable subsets. Results: Structural coverage is consistently near its ceiling and offers little discrimination among configurations. Executability varies substantially. The proposed prompt performs strongly for mutation score, but no prompt dominates across models. Model choice explains more variation than prompt choice, and their interaction shows that prompt effectiveness depends on the selected model. Human and LLM suites are evaluated on unequal executable subsets, so their relative mutation scores do not establish superiority. Conclusion: Reliable assessment of LLM-generated tests should treat executability as a gate and combine coverage with mutation testing and structural quality indicators. In practice, model selection should precede prompt tuning.
Problem

Research questions and friction points this paper is trying to address.

LLM-generated tests
executability
fault detection
structural quality
mutation testing
Innovation

Methods, ideas, or system contributions that make the work stand out.

prompt strategy
model choice
mutation testing
executability
structural coverage
πŸ’Ό Related Jobs
No related jobs found.
B
Bilal Al-Ahmad
Department of Computer Science and Engineering, American University of Sharjah, Sharjah, United Arab Emirates.
M
M. Harshvardhan
Information Systems and Analytics, American University of Sharjah, Sharjah, United Arab Emirates.
K
Khaled El-Fakih
Department of Computer Science and Engineering, American University of Sharjah, Sharjah, United Arab Emirates.
A
Anas AlSobeh
Information Systems and Technology Applied AI, Utah Valley University, Orem, Utah, United States.