Font Size: a A A

Research On Generation Method Of Class Integration Test Order Based On Reinforcement Learning

Posted on:2022-07-24Degree:MasterType:Thesis
Country:ChinaCandidate:Y R DingFull Text:PDF
GTID:2518306533479494Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Nowadays,computer science and technology are changing with each passing day,and the software industry has gradually penetrated into all aspects of social development.As an important technique to measure software quality,software testing can detect and correct errors in the software in time to avoid major losses for software producers and consumers.Integration testing is an indispensable part of the software testing process.For the problem of how to rationally sort the classes in the system during integration testing,domestic and foreign researchers have proposed a variety of methods to generate class integration test orders.However,most of them ignored the complexity of the test stubs,an important factor that can evaluate the cost of testing,and also ignored the importance of the class that can affect the stability of the software.In response to the above problems,this thesis proposes two improved strategies for the existing methods of generating integrated test orders based on reinforcement learning,and implements a tool that can use these two strategies to generate test orders.To solve the problem that the existing methods for generating class integration test orders based on reinforcement learning are not accurate enough to evaluate and determine the overall cost of class integration test orders,this thesis takes the overall test stub complexity as an index to evaluate the test cost,and proposes a method for generating class integration test orders based on reinforcement learning to generate class integration test orders with the lowest possible test cost.First,we define the reinforcement learning task;secondly,we design the reward function according to the complexity of the test stubs;then,the agent chooses actions based on the feedback rewards,and continuously interacts with the environment during the period;finally,when the generated class integration test order contains all classes of the system under test and when there is no repetition class,the training is completed.When the agent completes all training times,the system will select the order with the largest reward function for output.The experimental results show that our result is better in terms of the overall test stubs complexity as the evaluation index compared with the existing methods.To study the existing generation method of class integration test order based on reinforcement learning ignoring the influence of the importance of the class,this thesis proposes a method of generating class integration test order based on reinforcement learning considering the importance of class.First,we get the coupling information between classes through static analysis;secondly,we combine the influence of the class and the complexity of the class to measure the importance of the class,so that the class with high importance value is first tested;then,we design the reward function based on the importance of the class,and give feedback to the agent;finally,a class integration test order that considers the importance of classes is obtained.The experimental results show that considering the importance of classes does have an impact on the generated class integration test order and the test cost,and this effect is beneficial to reduce the test cost as much as possible while giving priority to testing important classes.In addition,this thesis implements an integration test order generation tool RLCITO based on reinforcement learning,which can use the two methods proposed in this thesis to generate class integration test orders.The thesis has 21 figures,18 tables,and 89 references.
Keywords/Search Tags:class integration test orders, reinforcement learning, class importance, testing cost, test stubs
PDF Full Text Request
Related items