论文标题
测试案例优先级的强化学习
Reinforcement Learning for Test Case Prioritization
论文作者
论文摘要
连续集成(CI)可显着减少整合问题,加快开发时间并缩短释放时间。但是,它还引入了质量保证活动的新挑战,包括回归测试,这是这项工作的重点。尽管在回归测试的背景下,已显示出各种测试案例优先级的方法非常有前途,但必须设计特定的技术来处理CI的动态性质和时机约束。 最近,强化学习(RL)在需要连续适应的各种具有挑战性的场景中表现出巨大的潜力,例如游戏玩法,实时广告竞标和推荐系统。受这一工作和基础的最初努力来支持测试案例优先用RL技术的启发,我们在这里对CI环境中基于RL的测试案例的优先级进行了全面调查。为此,使用三个替代排名模型将测试案例的优先级作为排名问题,我们将CI环境和测试用例优先级的顺序相互作用作为RL问题建模。然后,我们依靠精心挑选和量身定制的最先进的RL技术来自动,不断地学习测试案例的优先级策略,其目标是尽可能接近最佳策略。我们广泛的实验分析表明,最佳的RL解决方案比以前的基于RL的工作提供了显着的准确性改进,优先级的策略接近最佳,从而为在CI环境中使用RL优先考虑测试用例铺平了道路。
Continuous Integration (CI) significantly reduces integration problems, speeds up development time, and shortens release time. However, it also introduces new challenges for quality assurance activities, including regression testing, which is the focus of this work. Though various approaches for test case prioritization have shown to be very promising in the context of regression testing, specific techniques must be designed to deal with the dynamic nature and timing constraints of CI. Recently, Reinforcement Learning (RL) has shown great potential in various challenging scenarios that require continuous adaptation, such as game playing, real-time ads bidding, and recommender systems. Inspired by this line of work and building on initial efforts in supporting test case prioritization with RL techniques, we perform here a comprehensive investigation of RL-based test case prioritization in a CI context. To this end, taking test case prioritization as a ranking problem, we model the sequential interactions between the CI environment and a test case prioritization agent as an RL problem, using three alternative ranking models. We then rely on carefully selected and tailored state-of-the-art RL techniques to automatically and continuously learn a test case prioritization strategy, whose objective is to be as close as possible to the optimal one. Our extensive experimental analysis shows that the best RL solutions provide a significant accuracy improvement over previous RL-based work, with prioritization strategies getting close to being optimal, thus paving the way for using RL to prioritize test cases in a CI context.