A Time Window based Reinforcement Learning Reward for Test Case Prioritization in Continuous Integration

Continuous integration refers to the practice of merging the working copies of all developers into the mainline frequently. Regression testing for each mergence is characterized by continually changing test suite, limited execution time, and fast feedback, which demands new test optimization techniques. Reinforcement learning is introduced for test case prioritization to save computing resources in continuous integration environment, where a reasonable reward function is highly important for learning strategy, since the process of reinforcement learning is a reward-guided behavior. In this paper, APHFW, a novel reward function is proposed by using partial historical information of test cases effectively for fast feedback and cost reduction. The experiments are based on three open-source data sets, and the results show that the proposed reward function is more cost-effect than other reinforcement learning rewards in continuous integration environment.

[1]  Gregg Rothermel,et al.  Techniques for improving regression testing in continuous integration development environments , 2014, SIGSOFT FSE.

[2]  Nikolaj Bjørner,et al.  Optimizing Test Placement for Module-Level Regression Testing , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[3]  Myra B. Cohen,et al.  Combinatorial Interaction Regression Testing: A Study of Test Case Generation and Prioritization , 2007, 2007 IEEE International Conference on Software Maintenance.

[4]  Tibor Gyimóthy,et al.  Code coverage-based regression test selection and prioritization in WebKit , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[5]  Serge Demeyer,et al.  Considering Polymorphism in Change-Based Test Suite Reduction , 2014, XP Workshops.

[6]  Lionel C. Briand,et al.  Coverage‐based regression test case selection, minimization and prioritization: a case study on an industrial system , 2015, Softw. Test. Verification Reliab..

[7]  John Micco,et al.  Taming Google-Scale Continuous Testing , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[8]  Tao Xie,et al.  Learning for test prioritization: an industrial case study , 2016, SIGSOFT FSE.

[9]  Wei-Tek Tsai,et al.  Time-Constrained Test Selection for Regression Testing , 2010, ADMA.

[10]  Dusica Marijan,et al.  Effect of Time Window on the Performance of Continuous Regression Testing , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[11]  Dun-Wei Gong,et al.  Epistasis Based ACO for Regression Test Case Prioritization , 2017, IEEE Transactions on Emerging Topics in Computational Intelligence.

[12]  Gregg Rothermel,et al.  A Unified Test Case Prioritization Approach , 2014, ACM Trans. Softw. Eng. Methodol..

[13]  Gregg Rothermel,et al.  Redefining Prioritization: Continuous Prioritization for Continuous Integration , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[14]  Gregg Rothermel,et al.  Prioritizing test cases for regression testing , 2000, ISSTA '00.

[15]  Gregg Rothermel,et al.  A safe, efficient regression test selection technique , 1997, TSEM.

[16]  Arnaud Gotlieb,et al.  Test Case Prioritization for Continuous Regression Testing: An Industrial Case Study , 2013, 2013 IEEE International Conference on Software Maintenance.

[17]  Mark Harman,et al.  Search Algorithms for Regression Test Case Prioritization , 2007, IEEE Transactions on Software Engineering.

[18]  Tim Miller,et al.  Using Dependency Structures for Prioritization of Functional Test Suites , 2013, IEEE Transactions on Software Engineering.

[19]  Richard S. Sutton,et al.  Reinforcement Learning: An Introduction , 1998, IEEE Trans. Neural Networks.

[20]  Andy Zaidman,et al.  Change-Based Test Selection in the Presence of Developer Tests , 2013, 2013 17th European Conference on Software Maintenance and Reengineering.

[21]  Morten Mossige,et al.  Reinforcement learning for automatic test case prioritization and selection in continuous integration , 2017, ISSTA.

[22]  Mark Harman,et al.  Faster Fault Finding at Google Using Multi Objective Regression Test Optimisation , 2011 .

[23]  Gregg Rothermel,et al.  Prioritizing test cases for regression testing , 2000, ISSTA '00.