黑盒测试中的 ChatGPT 与人类协同:一项比较分析
ChatGPT and Human Synergy in Black-Box Testing: A Comparative Analysis
AI总结:
本文比较 GPT-4 与人类为三个应用生成的黑盒测试用例,发现二者协作可显著提升测试视角覆盖度,但 ChatGPT 用例仍存在需解决的问题。
摘要:
近年来,诸如 ChatGPT 之类的大型语言模型(LLM)在推动自然语言处理和软件工程等多种人工智能应用方面发挥了关键作用。一个颇具前景但尚未得到充分探索的领域是在软件测试中利用 LLM,尤其是在黑盒测试中。本文探讨了 ChatGPT 设计的测试用例,并将其与人类参与者创建的测试用例进行比较。在本研究中,ChatGPT(GPT-4)和四名参与者分别根据作者编写的规格说明为三个应用程序创建黑盒测试用例。目标是评估所提出测试用例的现实适用性,识别潜在缺陷,并理解 ChatGPT 如何增强人类测试策略。在测试视角覆盖度方面,ChatGPT 生成的测试用例总体上能够匹敌或略优于人类参与者创建的测试用例。此外,我们的实验表明,当 ChatGPT 与人类协作时,其能够覆盖的测试视角明显多于任何一方单独所能达到的程度,这表明人类与 ChatGPT 之间的协作可能比人类配对协作更有效。尽管如此,我们注意到 ChatGPT 生成的测试用例存在某些问题,在使用前需要加以解决。
英文摘要:
In recent years, large language models (LLMs), such as ChatGPT, have been pivotal in advancing various artificial intelligence applications, including natural language processing and software engineering. A promising yet underexplored area is utilizing LLMs in software testing, particularly in black-box testing. This paper explores the test cases devised by ChatGPT in comparison to those created by human participants. In this study, ChatGPT (GPT-4) and four participants each created black-box test cases for three applications based on specifications written by the authors. The goal was to evaluate the real-world applicability of the proposed test cases, identify potential shortcomings, and comprehend how ChatGPT could enhance human testing strategies. ChatGPT can generate test cases that generally match or slightly surpass those created by human participants in terms of test viewpoint coverage. Additionally, our experiments demonstrated that when ChatGPT cooperates with humans, it can cover considerably more test viewpoints than each can achieve alone, suggesting that collaboration between humans and ChatGPT may be more effective than human pairs working together. Nevertheless, we noticed that the test cases generated by ChatGPT have certain issues that require addressing before use.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。