Large-scale, Independent and Comprehensive study of the power of LLMs for test case generation
<|reference_start|>Large-scale, Independent and Comprehensive study of the power of LLMs for test case generation: Unit testing, crucial for ensuring the reliability of code modules, such as classes and methods, is often overlooked by developers due to time constraints. Automated test generation techniques have emerged to address this, but they frequently lack readability and require significant developer intervention. Large Language Models (LLMs), such as GPT and Mistral, have shown promise in software engineering tasks, including test generation, but their overall effectiveness remains unclear. This study presents an extensive investigation of LLMs, evaluating the effectiveness of four models and five prompt engineering techniques for unit test generation. We analyze 216 300 tests generated by the selected advanced instruct-tuned LLMs for 690 Java classes collected from diverse datasets. Our evaluation considers correctness, understandability, coverage, and test smell detection in the generated tests, comparing them to a widely used automated testing tool, EvoSuite. While LLMs demonstrate potential, improvements in test quality particularly in reducing common test smells are necessary. This study highlights the strengths and limitations of LLM-generated tests compared to traditional methods, paving the way for further research on LLMs in test automation.<|reference_end|>
@article{ouédraogo2024large-scale,,
    title={Large-scale, Independent and Comprehensive study of the power of LLMs
  for test case generation},
    author={Wendk^uuni C. Ou'edraogo, Kader Kabor'e, Haoye Tian, Yewei Song,
  Anil Koyuncu, Jacques Klein, David Lo, Tegawend'e F. Bissyand'e},
    journal={arXiv preprint arXiv:2407.00225},
    year={2024},
    archivePrefix={arXiv},
    eprint={2407.00225},
    primaryClass={cs.SE}
}