arXiv:2411.02328cs.SEcs.AI2024-11被引 5

AI编程助手生成的单元测试质量堪比人工,但工具表现有差异。

Disrupting Test Development with AI Assistants

  • 用测试金字塔框架对比三款AI编程助手生成的单元测试
  • AI生成测试与原生测试质量相当,但工具间表现不一
  • 适合关注AI辅助测试效率的开发者和研究者

大型语言模型(如GPT-4)及生成式AI编程工具(如GitHub Copilot、ChatGPT、Tabnine)显著改变了软件开发方式。本文分析这些工具对开发效率与测试流程的影响。尽管它们可实现低干预的代码生成,但开发者仍需进行充分审查与测试。基于测试金字塔理论,我们评估了三款主流AI编码助手在开源模块上生成单元测试的能力。结果表明,AI生成的测试质量与原始测试相当,但在使用方式与产出结果上存在明显差异。该研究深化了对AI辅助测试工具效能的理解。

原文摘要 · Abstract (English)

Recent advancements in large language models, including GPT-4 and its variants, and Generative AI-assisted coding tools like GitHub Copilot, ChatGPT, and Tabnine, have significantly transformed software development. This paper analyzes how these innovations impact productivity and software test development metrics. These tools enable developers to generate complete software programs with minimal human intervention before deployment. However, thorough review and testing by developers are still crucial. Utilizing the Test Pyramid concept, which categorizes tests into unit, integration, and end-to-end tests, we evaluate three popular AI coding assistants by generating and comparing unit tests for opensource modules. Our findings show that AI-generated tests are of equivalent quality to original tests, highlighting differences in usage and results among the tools. This research enhances the understanding and capabilities of AI-assistant tools in automated testing.

AI编程自动化测试生成式AI

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。