用强化学习让AI自动优化测试用例生成,越用越准。
Reinforcement Learning Integrated Agentic RAG for Software Test Cases Authoring
- AI代理通过强化学习持续优化测试用例生成策略
- 测试生成准确率提升至97.2%,缺陷发现率提高10.8%
- 适合质量工程团队长期迭代提升测试质量
本文提出一种将强化学习(RL)与自主智能体结合的框架,用于在质量工程(QE)工作流中从业务需求文档持续优化软件测试用例生成。传统基于大语言模型(LLM)的系统依赖静态知识库,难以自我改进。本文提出的强化注入型智能体RAG(Retrieve, Augment, Generate)框架通过专用智能体与混合向量-图知识库协同,利用近端策略优化(PPO)和深度Q网络(DQN)算法,根据QE反馈、测试有效性、缺陷发现率等指标动态优化行为。在企业级Apple项目上的实验表明:测试生成准确率从94.8%提升至97.2%(+2.4%),缺陷检测率提升10.8%。该框架构建了由质量专家经验驱动的知识闭环,逐步提升测试用例质量,增强而非替代人工测试能力。
原文摘要 · Abstract (English)
This paper introduces a framework that integrates reinforcement learning (RL) with autonomous agents to enable continuous improvement in the automated process of software test cases authoring from business requirement documents within Quality Engineering (QE) workflows. Conventional systems employing Large Language Models (LLMs) generate test cases from static knowledge bases, which fundamentally limits their capacity to enhance performance over time. Our proposed Reinforcement Infused Agentic RAG (Retrieve, Augment, Generate) framework overcomes this limitation by employing AI agents that learn from QE feedback, assessments, and defect discovery outcomes to automatically improve their test case generation strategies. The system combines specialized agents with a hybrid vector-graph knowledge base that stores and retrieves software testing knowledge. Through advanced RL algorithms, specifically Proximal Policy Optimization (PPO) and Deep Q-Networks (DQN), these agents optimize their behavior based on QE-reported test effectiveness, defect detection rates, and workflow metrics. As QEs execute AI-generated test cases and provide feedback, the system learns from this expert guidance to improve future iterations. Experimental validation on enterprise Apple projects yielded substantive improvements: a 2.4% increase in test generation accuracy (from 94.8% to 97.2%), and a 10.8% improvement in defect detection rates. The framework establishes a continuous knowledge refinement loop driven by QE expertise, resulting in progressively superior test case quality that enhances, rather than replaces, human testing capabilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。