Font Size: a A A

Research On Integration Testing Priority Based On Reinforcement Learning

Posted on:2024-08-10Degree:MasterType:Thesis
Country:ChinaCandidate:X T ZhangFull Text:PDF
GTID:2568306944959589Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software testing runs through the entire life cycle of software,which can effectively detect defects and control risks,and has been paid more and more attention.Integration testing is an important stage of software testing.It is responsible for assembling the components that pass the unit test into a complete system in order,and verifying the availability of each component.Components with different testing priorities lead to different integration orders,resulting in large differences in the final testing cost.Also,reducing the priority of key classes may increase the risk of actual testing.In fact,the testing priority problem is an NP-hard problem,so addressing it through automated means plays an important role in reducing testing costs and effectively controling testing risks.With the prevalence of machine learning,researchers at home and abroad have determined the testing priority based on reinforcement learning,which can adaptively adjust the integration test order and effectively reduce test costs.However,the existing methods suffers from problems such as high computational cost,inapplicability to large-scale software systems,and ignoring the hysteresis for testing risks,which greatly reduce the applicability and reliability of the model.Therefore,this study proposes a more robust reinforcement learning model to determine the testing priority.And on this basis,the single-objective optimization problem is transformed into a multi-objective optimization problem,and an improved strategy combined with complex networks is proposed.The main contributions of this paper are as follows:For the high computational cost and the low applicability,this study analyzes the reasons for the limited performance of the existing methods,and proposes a mask-based reinforcement learning model.First,the system integration state is defined by a sequence of masks,and accordingly the environment state and agent behavior in the reinforcement learning task are defined.Afterwards,with the goal of lower overall test stub complexity,the reward function and integration strategy are designed.Finally,combined with a deep reinforcement learning model,an integrated testing strategy is updated end-to-end,which is suitable for large-scale software systems.Experiments show that this method can effectively reduce the overall complexity of test stubs and has good robustness.For the single optimization objective and the hysteresis for testing risk,this study combines the idea of complex network to improve the reinforcement learning strategy.First,class importance is caluculated to quantitatively describe the extent to which the class under test is expected to be tested preferentially.Then,a reward function integrating the modified class importance is designed to meet the multi-objective optimization goal of reducing overall test stub complexity and increasing the priority of key classes.Finally,corresponding metrics are designed to evaluate the priority promotion of key classes.Experiments show that the reinforcement learning model combined with class importance can effectively improve the priority of key classes in test orders,with an average increase of 55.38%.In summary,this paper designs a masked sequence-based reinforcement learning model,which outperforms existing baseline models and is more robust.In addition,the improved reinforcement learning model combined with the idea of complex network can effectively control the risk of testing while reducing the cost of testing.
Keywords/Search Tags:test order, reinforcement learning, reward function, integration testing, class importance
PDF Full Text Request
Related items