| Software testing is the process of running or measuring software systems,and is an important means of ensuring software quality.In recent years,software test automation has developed rapidly,but the automatic generation of test cases is not yet perfect,and there are problems such as incomplete coverage of target paths and low efficiency of test case generation.This paper analyzes and studies artificial intelligence technology to improve the target path coverage and generation efficiency in software test case generation.The article is divided into three parts:(1)An improved genetic ant colony algorithm is proposed to solve the problem of low path coverage in automatic test case generation.First,an improved ant colony model is constructed,and the ant colony is first divided into worker ants and logistic ants.Worker ants select paths and release pheromones according to pseudo-random rules,and logistic ants select and construct optimal paths according to the concentration of pheromone released by worker ants;then in order to solve the problem of lack of initial pheromone in ant colonies,genetic algorithms are introduced to initialize improved ant colony algorithms Pheromone;the fitness function is improved to the sum of branch distance and path coincidence;finally,the standard genetic algorithm and the improved genetic ant colony algorithm are tested and analyzed by the triangle discrimination program,and the improved genetic ant is verified by experimental design and example analysis The group algorithm improves the coverage of the target path.(2)The use of reinforcement learning technology to automatically generate test cases improves the efficiency of test case generation.First add observation ants to the improved ant colony algorithm model,evaluate the behavior of worker ants in choosing paths,and update the pheromone concentration value of each node based on reinforcement learning technology;then build an overall framework and test based on the reinforced genetic ant colony algorithm Use cases to automatically generate a system model;finally,the standard discrimination algorithm,improved genetic ant colony algorithm,and enhanced genetic ant colony algorithm are analyzed from the indicators such as the optimal number of iterations,the average accuracy,and the number of optimal solutions through the triangle discrimination program.In summary,the experiment verifies the feasibility and efficiency of the enhanced genetic ant colony algorithm in improving the efficiency of software test case generation.(3)Apply the enhanced genetic ant colony model to the movie ticket purchasing system.Three programming experiments including user login,user search movie and administrator delete movie,statistics and comparison of standard path algorithm,genetic ant colony algorithm,and enhanced genetic ant colony algorithm in software test case automation,average coverage of target path,running time,Iterative times and other performance indicators,the experimental results show that the enhanced genetic ant colony algorithm is applicable and efficient in the automatic generation of test cases. |