| With the continuous development of technology,Unmanned Aerial Vehicle(UAV)is becoming more and more widely used.As its functions become more and more complex,the requirements for hardware and software systems of UAV are getting higher and higher.As the core of the UAV software system,the safe and stable operation of the flight control system is the basic guarantee for the UAV to complete complex tasks.The test of the drone flight control software is an important means to ensure the safe and stable operation of the flight control system.The automatic generation of test cases can effectively improve the test efficiency and test results,as well as reducing the occurrence of human error.Therefore,it is of great practical significance and application value to study the automatic test case generation technology of UAV flight control system and realize the automatic test tool.This study is based on the model-based design and software development method,then an UAV flight control software model of an aircraft design research institute in Chengdu was taken as the research basis to be compared and analyzed with the automatic generation methods of various test cases.Based on the existing greedy algorithm,combined with the Ant Colony Optimization,and obtain a simplified set of combined test cases by improving the fitness function in the algorithm and optimizing the algorithm parameters.And Set the requirements of aviation software and add logical coverage test cases.Finally,with the generation method as the core,a test tool suitable for the model test process is constructed and applied to the test of the actual flight control system model.The specific research process is:Firstly,several test case generation methods are compared and studied in order to compared the advantages and disadvantages.Based on this,a combination test case generation method based on Ant Colony Optimization is proposed.Firstly,improved the fitness function in the algorithm,and compared the program with other algorithms after the parameter tuning,the experiment proved that the method can generate a more compact combination test case set.After that,studied the logical coverage test of aeronautical software testing,explored a test case generation method that can supplement the set of combined test cases to generate MC/DC logic coverage tests.Secondly,obtained a visual testing tool conforming to the model-based software development process by using M language design.The tool mainly includes test case and model reading function,test case generation function,test case management function,test case automatic execution and report generation function.At the last,the tool is packaged and released as APP in MATLAB,which is convenient for installation and tool version management.Finally,the paper applied the visual testing tool,and builded the experimental environment with the model of a certain type of UAV flight control system as the test object.The result of the coverage is better than that of the manual test cases,and the function of the test tool is also verified.In summary,the paper through theoretical research to the test tool implementation,and then to the final stage of the flight control model test and verification,proved that the research method proposed is scientific and effective. |