DroneTest-Copilot: LLM-Powered Automated Detection and Repair of Flaws in Drone Autotest Suites

Read full text
Authors: Ziyi Liang, L. Z. HU, Qiyuan Fan, Bin Yuan, Qiankun Zhang, Deqing Zou, Hai Jin
Cited by: 1
References: 121

Abstract

In the landscape of the low-altitude economy, ensuring the reliability of drone flight control software is of utmost importance. ArduPilot's autotest is an automated testing framework integrated into its continuous integration (CI) pipeline, which is crucial for validating autopilot functionality. However, numerous logic defects exist in its test cases, where the intended workflow doesn't match the code implementation. This paper presents DroneTest-Copilot (DTC), a novel framework that leverages large language models (LLMs) to automate the validation and correction of autotest test cases. The system consists of four components: Preprocessor, Test Case Processor, Flaw Corrector, and Vulnerability Tester. It extracts relevant context from pull requests, uses LLMs to detect flaws such as parameter mismatch, API misuse, execution order errors, and logic errors, and then generates corrected test code. We also conduct a detailed survey and comparative analysis of existing related works to highlight the novelty and positioning of DTC. Evaluations on a dataset of patched and new test case pull requests show that DTC can correctly identify 87.23% of introduced defects in the verification set and discover previously unknown vulnerabilities in the new test case set. DTC substantially reduces manual effort in maintaining autotest suites and uncovers subtle flaws in test case code, enhancing the reliability of drone flight control software.

Fields of Study & Subjects

Air Traffic Management and Optimization Software Testing and Debugging Techniques UAV Applications and Optimization

Publication details

Journal / source
IEEE Transactions on Network Science and Engineering
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
13
Pages
6685–6705
Publication date
1 January 2026