Font Size: a A A

Research On Automatic Generation Algorithm Of Test Cases Based On Data Flow Coverage

Posted on:2022-08-02Degree:MasterType:Thesis
Country:ChinaCandidate:X Y SunFull Text:PDF
GTID:2518306524994089Subject:Electronics and Communications Engineering
Abstract/Summary:PDF Full Text Request
Computer software is gradually infiltrating all areas of people's lives,and people have a higher demand for the quality of software.Adding a complete software testing process at each stage of software development can ensure the adequacy of testing and the reliability and safety of the software.Among them,the design of test cases(TC)is often the main problem,and automated test case generation has become the focus of people's attention.Data flow-based test case generation mainly uses search algorithms to generate TC that meet the data flow coverage criteria.Compared with the control flow coverage criterion,the data flow coverage criterion does not lose the data flow interaction relationship between the methods.In the process of test case generation,the performance of the algorithm and the time cost of instrumenting the program under test seriously affect the coverage of TC and the efficiency of generation.At present,the current technology still has room for improvement in performance.The test case generation based on data flow still has the problems of relatively low TC coverage,insufficient local search capabilities of genetic algorithms,and high time consumption and computational consumption for instrumentation.Therefore,in order to improve the coverage of TC and reduce time consumption,this thesis mainly focuses on the automatic generation algorithm of TC based on data flow coverage criteria.The research content and achievements are as follows:(1)Aiming at the disadvantages of genetic algorithm and simulated annealing algorithm,a strategy of intermittently adding simulated annealing algorithm based on the genetic algorithm according to the current population coverage is proposed.In the mutation stage,the coverage rate is used to determine whether to accept bad individuals with a certain annealing probability.And a design experiment was compared with other algorithms and literature for proving the significance of the improved algorithm in the generation of TC in the data flow coverage criterion.The results show that the coverage rate of the improved algorithm is significantly improved compared with other test case generation algorithms.The number of iterative times is reduced,and the algorithm performance is improved.(2)Aiming at the problems of time loss and calculation consumption in the process of instrumenting,this thesis proposes a method of using neural networks to establish a surrogate model to simulate the fitness value calculation process,so that the fitness value of the TC can be obtained without executing the source tested program.Secondly,in order to improve the accuracy and the generalization ability of the network,this thesis proposes a hidden layer neuron optimization strategy to optimize the number of neurons and improve the network performance.Experiments are set up for verification,and the results show that the model can be used to calculate the fitness value of TC,and the generation time of TC is significantly reduced compared with the instrumentation method,and the number of hidden layer neurons is relatively small.(3)According to the test case generation method mentioned in the thesis,this thesis conceives and implements the TC generation software under the data flow coverage criterion.From the login module,the data flow analysis module,the TC generation module and the TC management module,four sub-modules are designed and implemented to achieve the goal of improving the test efficiency of testers.
Keywords/Search Tags:test case generation, improved genetic algorithm, RBF neural network, fitness value calculation
PDF Full Text Request
Related items