Font Size: a A A

Research On Reinforcement Learning Reward Of Continuous Integration Testing Based On Sliding Window For Test Case Prioritization

Posted on:2022-10-23Degree:MasterType:Thesis
Country:ChinaCandidate:Z L WuFull Text:PDF
GTID:2518306602956059Subject:Control Science and Engineering
Abstract/Summary:PDF Full Text Request
In the continuous integration(CI)test environment,test cases need to be sequenced and executed frequently in order to find software integration errors as early as possible and save development time and cost.The continuous integration test case prioritization technology(TCP)based on the reinforcement learning method uses the test execution history information to calculate the reward function,which solves the problem of large changes of test case sets in the continuous integration and high cost of acquiring the relationship between the test and the code.Test execution history information contains a variety of characteristics.Reasonable use of test execution history information to design a reward function can effectively improve the efficiency of reinforcement learning,thereby reducing time overhead,improving ranking performance,and meeting the needs of rapid feedback in continuous integration testing.Test execution history information will accumulate due to frequent integration tests,which in turn leads to a decrease in the efficiency of reward calculations.Based on the hypothesis that the execution results of the near period are more valuable,this paper uses the near part of the test execution history to replace all the historical information,and proposes the reward function of the average historical execution failure rate(APHFW)of test cases based on the timing sliding window.In addition,the number of historical failures and the distribution of historical failures in the historical execution information of test cases are important influencing factors related to each other.Considering one factor alone can cause confusion in the calculation of the reward function.Based on the assumption that the greater the number of failures and the nearer the failure location,the stronger the failure detection ability of test cases,and further proposes a reward function(FHDW)based on the combination of historical failure distribution and the number of failure history.This paper conducts an empirical study on the prioritization performance and efficiency of APHFW rewards and FHDW rewards on industrial data.The results show that:(1)APHFW rewards part of the historical information through the timing sliding window,and its prioritization performance retention time overhead can be significantly reduced;(2)The use of the reward function FHDW based on the historical failure distribution can be more reasonable considering the number of historical failures to calculate the reward value to obtain a better prioritization performance than APHFW;(3)Through the simulation experiment of industrial data sets,it is verified that APHFW reward and FHDW reward can indeed improve the efficiency and performance of test prioritization.
Keywords/Search Tags:test case prioritization, continuous integration, reinforcement learning, sliding window, test execution result
PDF Full Text Request
Related items