TestFlow: Advancing Mobile UI Testing through Multi-Step Reinforcement Learning
Xiaoxuan Tang, Xinfang Chen, Dajun Chen, Sheng Zhou, Wei Jiang, Yong Li · 2025
GUI Agents have demonstrated promising applications in mobile UI testing. However, for complex testing tasks, UI agents tend to fail due to their greedy approach in executing step-by-step operations, leading to error accumulation and neglecting long-horizon dependencies. To address these limitations, we propose TestFlow, a novel multi-modal UI testing model that combines Supervised Fine-Tuning with a Task-aware Reinforcement Learning framework. Our approach implements a two-phase training pipeline designed to optimize long-horizon instruction compliance and complex task completion. Additionally, we develop a tailor-made reward function that integrates both process and outcome rewards to improve the completion rate of multi-step tasks. The experimental results demonstrate that TestFlow significantly outperforms the baseline methods, achieving 33. 69% WTSR and 55. 37% SSR in cross-page test scenarios. These improvements highlight the practical value of TestFlow in addressing the challenges of modern mobile app testing, particularly in industrial settings requiring high adaptability and reliability.