Reward of Reinforcement Learning of Test Optimization for Continuous Integration

被引:0
作者
He L.-L. [1 ]
Yang Y. [1 ]
Li Z. [1 ]
Zhao R.-L. [1 ]
机构
[1] College of Information Science and Technology, Beijing University of Chemical Technology, Beijing
来源
Ruan Jian Xue Bao/Journal of Software | 2019年 / 30卷 / 05期
基金
中国国家自然科学基金;
关键词
Continuous integration testing; Historical execution information of test case; Reinforcement learning; Reward function; Test case prioriitization;
D O I
10.13328/j.cnki.jos.005714
中图分类号
学科分类号
摘要
Testing in continuous integration environment is characterized by constantly changing test sets, limited test time, fast feedback, and so on. Traditional test optimization methods are not suitable for this. Reinforcement learning is an important branch of machine learning, and its essence is to solve sequential decision problems, thus it can be used in test optimization in continuous integration. However, in the existing reinforcement learning based methods, the reward function calculation only includes the execution information of the test case in the current integration cycle. The research is carried out from two aspects: reward function design and reward strategy. In the design of reward function, complete historical execution information of the test case is used to replace the current execution information and the total number of historical failures and historical failure distribution information of the test case is also considered. In terms of the reward strategy, two reward strategies are proposed, which are overall reward for test cases in current execution sequence and partial reward only for failed test cases. In this study, experimental research is conducted on three industrial-level programs. The results show that: (1) Compared with the existing methods, reinforcement learning methods based on reward function with complete historical information proposed in this study can greatly improve the error detection ability of test sequences in continuous integration; (2) Test case historical failure distribution can help to identify potential failure test cases, which is more important for the design of the reward function in reinforcement learning; (3) The two reward strategies, i.e. overall reward and partial reward, are influenced by various factors of the system under test, therefore the reward strategy need to be selected according to the actual situation; and (4) History-based reward functions have longer time consumption, though the test efficiency is not affected. © Copyright 2019, Institute of Software, the Chinese Academy of Sciences. All rights reserved.
引用
收藏
页码:1438 / 1449
页数:11
相关论文
共 21 条
[1]  
Busjaeger B., Xie T., Learning for test prioritization: An industrial case study, Foundations of Software Engineering, pp. 975-980, (2016)
[2]  
Spieker H., Gotlieb A., Marijan D., Et al., Reinforcement learning for automatic test case prioritization and selection in continuous integration, Proc. of the Int'l Symp. on Software Testing and Analysis, pp. 12-22, (2017)
[3]  
Bian Y., Yuan F., Guo J.X., Li Z., Zhao R.L., CPU+GPU heterogeneous computing orientated multi-objective test case prioritization, Ruan Jian Xue Bao/Journal of Software, 27, 4, pp. 943-954, (2016)
[4]  
Wong W.E., Horgan J.R., London S., Agrawal H., A study of effective regression testing in practice, Proc. of the Int'l Symp. on Software Reliability Engineering, pp. 264-274, (1997)
[5]  
Rothermel G., Untch R.H., Chu C., Harrold M.J., Prioritizing test cases for regression testing, IEEE Trans. on Software Engineering, 27, 10, pp. 929-948, (2001)
[6]  
Yoo S., Harman M., Regression testing minimization, selection and prioritization: A survey, Software Testing, Verification & Reliability, 22, 2, pp. 67-120, (2012)
[7]  
Li Z., Harman M., Hierons R.M., Search algorithms for regression test case prioritization, IEEE Trans. on Software Engineering, 33, 4, pp. 225-237, (2007)
[8]  
Li Z., Bian Y., Zhao R.L., Et al., A fine-grained parallel multi-objective test case prioritization on GPU, Proc. of the Symp. on Search Based Software Engineering, pp. 111-125, (2013)
[9]  
Bian Y., Li Z., Zhao R.L., Et al., Epistasis based ACO for regression test case prioritization, IEEE Trans. on Emerging Topics in Computational Intelligence, 1, 3, pp. 213-223, (2017)
[10]  
De Souza L.S., De Miranda P.B., Prudencio R.B., Barros F.A., A multi-objective particle swarm optimization for test case selection based on functional requirements coverage and execution effort, Proc. of the Int'l Conf. on Tools with Artificial Intelligence, pp. 245-252, (2011)