Abstract
With the continuous expansion of software system scale, the complexity of API (Application Programming Interface) testing has been escalating, making traditional manual testing approaches increasingly insufficient to meet the demands of rapid iterative development. In recent years, Large Language Models (LLMs) have demonstrated remarkable capabilities in software engineering tasks, offering new technological pathways for automated testing. This study proposes a multi-stage collaborative automated testing framework for API testing driven by LLMs. The framework decomposes the complete API testing process into four stages—specification parsing, test case generation, test execution, and result verification—each handled by a specialized LLM Agent, forming a clear division of labor. Experiments conducted on three mainstream REST APIs demonstrate that the framework achieves an 87% test case generation rate and an 83% accuracy rate. Compared with end-to-end single-model approaches, the accuracy improves by approximately 11 percentage points, while the average execution time is reduced from 45 minutes to 8 minutes. This study validates the effectiveness of decomposing complex testing workflows and assigning them to specialized LLM agents, providing new insights for LLM-driven software testing research.
References
1. Zhu, Y., Liu, Q. Hybrid graph attention network-LSTM models for causal-aware supply chain forecasting. J Intell Manuf (2026). https://doi.org/10.1007/s10845-025-02782-3
2. Zhu, Y., & Liu, Q. (2025). Toward transparent groundwater contamination risk forecasting: Integrating causal discovery and Bayesian graph neural networks. Science of the Total Environment, 998, 180233. https://doi.org/10.1016/j.scitotenv.2025.180233
3. Zhu, Y. Application of a QPSO-optimized CNN-LSTM model in water quality prediction. Discov Water 4, 100 (2024). https://doi.org/10.1007/s43832-024-00161-2
4. Zhou, K., Zhong, L., Liu, J. et al. Unveiling the Role of Western Pacific Subtropical High in Urban Heat Islands Using Local Climate Zones Coupled WRF-BEP/BEM. Earth Syst Environ 10, 363–390 (2026). https://doi.org/10.1007/s41748-025-00589-z
5. Zhao, Y., Zhong, L., Zhou, K., Liu, B., & Shu, W. (2024). Responses of the urban atmospheric thermal environment to two distinct heat waves and their changes with future urban expansion in a Chinese megacity. Geophysical Research Letters, 51(11), Article e2024GL109018. https://doi.org/10.1029/2024GL109018
6. Huang, H., Tang, J., Liu, T., & Huang, M. (2026). Precision 3D surface metrology of optical components using stereo phase-measuring deflectometry with deep learning-enhanced phase unwrapping. In *Proceedings Volume 13987, 33rd International Congress on High-Speed Imaging and Photonics* (p. 1398704). SPIE. https://doi.org/10.1117/12.3093993
7. Huang, H., Yang, Y., & Zhu, Y. (2023). Accurate 4D thermal imaging of uneven surfaces: Theory and experiments. *International Journal of Heat and Mass Transfer*, 216, 124580. https://doi.org/10.1016/j.ijheatmasstransfer.2023.124580
8. Wang, S., Yu, Y., Feldt, R., & Parthasarathy, D. (2025). Automating a complete software test process using LLMs: An automotive case study. 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE), 1–12. https://doi.org/10.1109/ICSE55347.2025.00211
