Software testing exists as a separate stage in the lifecycle of software development.With the continuous expansion and enlargement of software applications and software size,there is an increasing demand for high-quality software products and software testing is consequently getting more and more attention.Designing the test cases that are correct and as much as possible covers,would make the whole testing process successfully conducted.Based on a variety of coverage criteria,test cases could be automatically generated after several steps.There are researches showing that path coverage is a very important coverage criteria.And a variety of intelligent algorithms could be applied to the automatic generation of path coverage of test cases.At present,the widely used algorithms in that area have common shortcomings:high program complexity and prone to "premature".The Fruit Fly Optimization Algorithm is a new type of meta-heuristic optimization algorithm,which now has become one of the popular branches in the field of computational intelligence and has been well applied in the field of solving mathematical function extreme value.At the same time,the algorithm has been developed to use in a few areas,and the algorithm needs to be improved in the overall searching capability.This paper studies how to enhance the Fruit Fly Optimization Algorithm and make it applied to deal with the problem of automatically generating cases of path coverage testing,which mainly includes the following three aspects:(1)Research on single path coverage testing.In this paper,a study of the generation of cases of path coverage testing based on the Chaotic Fruit Fly Optimization Algorithm is proposed.The Fruit Fly Optimization Algorithm has the advantages of small amount of calculation,simple procedure,high precision and so on,while with the problem of poor stability.In view of the above challenges,the introduction of chaotic factors and chaotic interference to the best individuals generated during each iteration are necessary to solve the "premature" problem of the algorithm.In addition,adjusting The Fruit Fly Optimization Algorithm,problem modeling and other design,then reasonably being applied into path coverage testing and comparing it with similar methods,could verify the efficiency of this method in solving such problems.(2)Research on multipath coverage testing.This paper proposes the technology research on the generation of cases of multipath coverage when integrating the two optimal concepts of the PSO into the Fruit Fly Optimization Algorithm.In this paper,the individual optimal concept and the globally optimal concept of the PSO are integrated with the Fruit Fly Optimization Algorithm,and the single optimal value of the Fruit Fly Optimization Algorithm is replaced by two different optimal values.Based on the two foregoing steps,the overall searching capacity of the Fruit Fly Optimization Algorithm could be enhanced with the evolution of iteration process.Still,adjusting the Fruit Fly Optimization Algorithm,problem modeling and other design,then reasonably being applied into path coverage testing and comparing it with the improving method of the PSO,could verify the efficiency of this method in solving such problems.(3)Relevant research on fitness function in path coverage testing.Considering the design of fitness function,branch distance and approach level are two widely accepted parts.In the part of approach level,this paper proposes a method of adding weight coefficient with the consideration of the dependencies among multi-layer nests in program,which could distinguish the importance of different nodes and make it more accurately calculate the fitness values.Upon those means,the convergence efficiency of the generation of path coverage testing would be enhanced.Finally,this paper analyzes and concludes the contribution of research on path coverage testing based on the Fruit Fly Optimization Algorithm,and further indicates the next research direction of path coverage testing and the Fruit Fly Optimization Algorithm. |