Evaluating large language models for software testing
• We present a new evaluation framework for testing the capabilities of LLMs , using manual testing as a benchmark to assess different LLMs. This approach avoids the potential reliance on existing test sets that may be part of LLM training data , ensuring a more reliable evaluation of their generalization capabilities. • We utilize third-party open-source software for LLM testing evaluation, ensuring bug reproducibility and simulating the real-world application of LLMs in software testing, thus enabling more objective evaluations. • We evaluate different LLMs from multiple perspectives and discuss practical strategies for implementing LLM-driven testing effectively. • We propose the follow-up question method for LLM-driven testing, which shows promise in enhancing the abilities of LLMs to detect bugs and defects in program code. Large language models (LLMs) have demonstrated significant prowess in code analysis and natural language processing, making them highly valuable for software testing. This paper conducts a comprehensive evaluation of LLMs applied to software testing, with a particular emphasis on test case generation, error tracing, and bug localization across twelve open-source projects. The advantages and limitations, as well as recommendations associated with utilizing LLMs for these tasks, are delineated. Furthermore, we delve into the phenomenon of hallucination in LLMs, examining its impact on software testing processes and presenting solutions to mitigate its effects. The findings of this work contribute to a deeper understanding of integrating LLMs into software testing, providing insights that pave the way for enhanced effectiveness in the field.
Authors
- W. Eric Wong (ORCID: https://orcid.org/0000-0002-1021-4753)
- Haiyang Wang (ORCID: https://orcid.org/0000-0003-2273-2686)
- Yihao Li (ORCID: https://orcid.org/0000-0001-9874-0338)
- Jie Chu (ORCID: https://orcid.org/0000-0002-1071-9292)
- Pan Liu (ORCID: https://orcid.org/0000-0003-1296-3288)
Institutions
- Shanghai Business School (CN)
- The University of Texas at Dallas (US)
- Ludong University (CN)
- Yantai University (CN)
- Yantai Academy of Agricultural Sciences (CN)
Publication Details
- Journal
- Computer Standards & Interfaces
- Published
- 2024-11-13
- DOI
- https://doi.org/10.1016/j.csi.2024.103942
- Citations
- 23
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 11.17