Abstract:Driven by agile development and continuous delivery practices, Android applications now have increasingly shorter iteration cycles, which significantly reduces the available testing window. Distributed testing increases available testing resources and improves parallel execution capability, thus helping ensure the quality of Android applications under rapid iteration. Although numerous existing tools focus on improving testing effectiveness on a single device, how to further enhance the parallel efficiency of automated Android testing under constrained resources and time remains a pressing challenge. This study proposes a distributed automated testing framework named Distroid, which partitions the overall state space and guides multiple devices to explore distinct UI subregions during testing, achieving adaptive exploration of Android applications. Based on this collaborative mechanism, Distroid adopts a two-level guidance strategy for each testing device to improve both testing effectiveness and efficiency. On one hand, a curiosity-driven reinforcement learning approach is adopted to construct high-quality action sequences that encode the temporal logic of complex user interactions. The reward function incorporates a method for computing application state similarity to provide low-level guidance during exploration. On the other hand, to avoid being trapped in local optima, Distroid incrementally constructs a deterministic finite automaton (DFA) at runtime to offer high-level guidance, further enhancing testing efficiency and quality. To evaluate the effectiveness of Distroid, experiments are conducted on 30 real-world Android applications. The results illustrate that Distroid attains higher failure detection rates, code coverage, and efficiency than the state-of-the-art Android testing approaches. In particular, Distroid detected 41 failures, and 26 of them were previously unknown.