Font Size: a A A

Resaerch On Software Continuous Integration Technology Based On Reinforcement Learning

Posted on:2023-08-19Degree:MasterType:Thesis
Country:ChinaCandidate:T G CaoFull Text:PDF
GTID:2568306794490134Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
In software development continuous integration test environments,test case prioritization can reduce test execution time by prioritizing test cases that find errors potentially when the integration code is submitted,thus effectively alleviating the computational resource-intensive problem caused by frequent integration submissions.In a continuous integration environment,test case prioritization is a sequential decision problem,and the reinforcement learning algorithm can adapt to the changing environment effectively and learn the optimal sequencing strategy by interacting with the environment.Continuous integration testing is characterized by frequent integration but has a low test failure rate,and the application of reinforcement learning will face the sparse reward problem,which affects the learning effect of the test case prioritization strategy.The sparse reward problem can be mitigated by optimizing the test case reward mechanism for reinforcement learning.Existing studies optimize the reward mechanism based on the history information for individual test cases and construct a reward mechanism to promote the learning of intelligence by correlating the test cases’ history information with that of the error detection ability.However,in real-life industrial programs,the sparse reward problem still exists since the same low historical execution failure rate of test cases.Based on the application of individual test case history information,this paper further predicts the future execution of test cases and proposes an external incentive mechanism based on individual test cases and an internal incentive mechanism based on the testing environment to improve the reward mechanism in reinforcement learning.In the external incentive mechanism based on individual test cases history information,this paper analyses the validity of test case history information,evaluates the error detection ability of test cases,and adds the passing test cases with failure potential as reward objects to increase the density of rewards;in the internal incentive mechanism based on the testing environment,this paper adds additional rewards from the perspective of stimulating the ability of intelligence to explore the environment and designs the test environment accessibility-based internal incentive mechanism.To verify the effectiveness of the two reward mechanisms,this paper conducted an experimental study on six industrial datasets.The results show that the proposed external reward mechanism based on the smoothness of the test case history information improves the existing partial and full reward mechanisms by 28.72% and 9.96%,respectively.Also,the proposed mechanism first detected the error 183.29,and 2.41 ranks ahead of the previous mechanism on average.Moreover,the internal incentive mechanism based on the test environment accessibility promotes the overall convergence of the reward mechanism in reinforcement learning and improves the performance of the standardized error detection rate by 5.37% and the first error detection by 21.71 ranks,compared to the mechanism that only consider external rewards.Meanwhile,the experimental results show that the time cost of the proposed mechanism that optimizes the reinforcement learning does not affect the overall efficiency of continuous integration.
Keywords/Search Tags:continuous integration testing, reinforcement learning, internal incentives, test environment accessibility, test case prioritization
PDF Full Text Request
Related items