arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.19261cs.SE
收藏

评估大型语言模型在检测测试坏味中的能力

Evaluating Large Language Models in Detecting Test Smells

Keila Lucas, Rohit Gheyi, Elvys Soares, Márcio Ribeiro, Ivan Machado

AI总结:

本研究评估了ChatGPT-4、Mistral Large和Gemini Advanced三种大型语言模型在七种编程语言代码库中自动检测30种测试坏味的能力,发现它们分别识别出21、15和17种,展现了作为测试坏味检测工具的潜力。

摘要:

测试坏味是通常由于不当实践、缺乏有效测试知识或项目完工截止日期压力而产生的代码问题。测试坏味的存在会对软件的可维护性和可靠性产生负面影响。虽然现有工具使用高级静态分析或机器学习技术来检测测试坏味,但这些工具往往需要投入精力才能使用。本研究旨在评估大型语言模型(LLMs)自动检测测试坏味的能力。我们使用从文献中收集的七种不同编程语言代码库中的30种测试坏味类型,评估了ChatGPT-4、Mistral Large和Gemini Advanced。ChatGPT-4识别出21种测试坏味。Gemini Advanced识别出17种,而Mistral Large检测出15种测试坏味。结论:LLMs展现了作为识别测试坏味有价值工具的潜力。

英文摘要:

Test smells are coding issues that typically arise from inadequate practices, a lack of knowledge about effective testing, or deadline pressures to complete projects. The presence of test smells can negatively impact the maintainability and reliability of software. While there are tools that use advanced static analysis or machine learning techniques to detect test smells, these tools often require effort to be used. This study aims to evaluate the capability of Large Language Models (LLMs) in automatically detecting test smells. We evaluated ChatGPT-4, Mistral Large, and Gemini Advanced using 30 types of test smells across codebases in seven different programming languages collected from the literature. ChatGPT-4 identified 21 types of test smells. Gemini Advanced identified 17 types, while Mistral Large detected 15 types of test smells. Conclusion: The LLMs demonstrated potential as a valuable tool in identifying test smells.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑