Font Size: a A A

Research On Automatic Generation Of Test Cases Based On Feasible Paths

Posted on:2020-05-21Degree:MasterType:Thesis
Country:ChinaCandidate:R ZhangFull Text:PDF
GTID:2428330575961919Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software testing is an indispensable process in the process of software development,and it is also an effective method to ensure the quality of software.Currently,software testing tends to adopt an automated process.Software automated testing can cut back the cost of development and enhance the effectiveness of test.Automatic generation of test cases is a significant section of software automated testing.There are many ways to generate test cases,but the most widely used and most efficient method is the meta heuristic algorithm.The efficiency of test case generation is closely related to the path of the program under test.This paper mainly studies the test case generation based on the feasible path of the program to be tested.Firstly,based on the existing key path representation,the improvement is proposed.Next,two optimizations are proposed for the flower pollination algorithm,and then they are merged into a test case model.The main work of this paper is as follows:Firstly,the key point path representation method is studied and its applicability and limitations are analyzed.A feasible path representation method is proposed for the limitation of the method.This method is in line with the research purposes of this paper,and uses the simplified instrumentation method to insert the test program.The feasible path representation method is a static method.Before the experiment to be tested,the path analysis of the program to be tested is used to obtain the specific path information of the program,and the feasibility measurement of the feasible path set is performed again by using the reverse symbol execution technique,and finally get a set of feasible paths for the program.Then,the flower pollination algorithm was studied,due to the flower pollination algorithm showed insufficient performance in many aspects,such as adaptability,optimization precision,convergence speed and local extreme value.In order to solve many shortcomings of flower pollination algorithm,this paper proposes a new modified flower pollination algorithm(NMFPA).The two optimizations of the new algorithm are the global solution direction for all population members and the optimal solution vector for constructing a set of fitness functions.The superiority of the algorithm is verified by experiments.Finally,the applicability and efficiency of the proposed algorithm are verified.Four test programs with different complexity differences were selected to perform simulation experiments in MATLAB.Two improved meta heuristic algorithms were selected to compare with the proposed algorithm.After the experiment,the three indicators of average consumption time,average iteration number and average branch coverage of feasible path are compared and analyzed,and the superiority of the algorithm is verified.
Keywords/Search Tags:Software testing, Feasible path representation, Flower pollination algorithm, Test case
PDF Full Text Request
Related items