EpiDroid: Dependency-Guided Recomposition for Deep State Discovery in Mobile GUI Testing

Jiahui Song, Jiaxin Zhi, Kangjia Zhao, Chen Zhi, Junxiao Han, Xinkui Zhao, Nan Wang, Shuiguang Deng, Jianwei YinarXiv 2026

TL;DR

Automated mobile app testing often hits a wall because tools explore screens linearly, ignoring how an action on one page might unlock a feature on another. EpiDroid is a pluggable, black-box framework that uses Large Language Models (LLMs) to discover these hidden state dependencies from execution traces. By intelligently pairing state-changing actions with targeted page revisits, EpiDroid systematically unlocks deep application states, boosting code coverage by up to 28%.

What Problem Does This Paper Address?

Imagine testing a video streaming app. You open a video player (Branch A), and it plays with default settings. Later, you wander into the settings menu (Branch B) and change the video resolution. To test if the app actually handles that new resolution correctly, you need to go back to the video player.

Traditional automated GUI testing tools fail at this. They operate on a forward-execution paradigm, constantly asking, "What new component can I click next on this current screen?" Once they explore a path, they deprioritize it. They lack the "hindsight" to realize that an action on Screen B has completely changed the behavior of Screen A. This limitation leaves deep, state-conditioned features completely unexercised.

Motivation cases in NewPipe showing how forward exploration misses state-dependent branches.

Methods

EpiDroid introduces a Recomposition-Replay paradigm that acts as a smart plugin layer on top of existing testing tools. It operates in three distinct stages:

  1. Trace Stabilization & State-Change Tracking: Raw GUI exploration is incredibly noisy due to network lag, animations, and redundant loops. EpiDroid slices and stabilizes these traces into clean, reproducible fragments. Simultaneously, it tracks Mutable State Elements (MSEs)—like toggled switches, radio groups, or text inputs—that alter the app's internal state.
  2. Semantic Profiling & Impact Reasoning: Passing raw UI data to an LLM is expensive and confusing. EpiDroid feeds the stabilized fragments and MSEs to an LLM (configured as GPT-5 mini in the study) to filter out non-functional UI noise. The LLM then categorizes the impact of state changes into Intra-page, Global, or Inter-page dependencies, prioritizing the high-value inter-page changes.
  3. Dependency-Guided Sequence Recomposition: Instead of blindly clicking forward, EpiDroid uses the LLM to generate a non-linear "recomposition plan." The framework executes the state mutation (e.g., subscribing to a user) and then immediately navigates back to the dependent page (e.g., the subscription feed) to see what changed.

Through a closed-loop feedback system, successful discoveries are added to a growing State Dependency Graph.

Figure 2: Framework overview of EpiDroid. Stage 1 stabilizes raw traces and extracts replayable fragments with runtime mutation evidence. Stage 2 performs semantic profiling and impact reasoning to infer cross-page dependencies and prioritize MSEs. Stage 3 synthesizes and replays dependency-guided composite sequences, and feeds execution outcomes back to refine the semantic dependency graph iteratively.

Datasets

The authors evaluated EpiDroid using a benchmark of 20 real-world Android applications. To prevent evaluation bias, they maintained a strict 1:1 split between open-source apps (sourced from F-Droid, such as NewPipe and AntennaPod) and closed-source commercial apps (sourced from the Google Play Store, such as SmartNews and AccuBattery). These apps spanned various complexities and domains, including finance, productivity, and multimedia.

Key Insights and Ideas

  • The 30-Minute Saturation Wall: The authors observed that standard forward-exploration tools completely saturate within 30 minutes. Continuing to run them for another 30 minutes yields a meager 1% improvement in code coverage.
  • Hindsight is Better Than Foresight: Reaching deep app states isn't about making smarter "next-click" choices; it's about looking back at what you've already altered and understanding how those changes compose globally.
  • LLMs Need a Filter: Directly hooking an LLM up to a live GUI stream is inefficient. By using Stage 1 to stabilize and compress traces first (removing up to 63.4% of redundant events), the LLM receives clean semantic descriptions, preventing hallucinations and drastically lowering token costs.

Key Results

The authors paired EpiDroid with three state-of-the-art testing baselines (Fastbot, LLM-Explorer, and LLMDroid) over a 1-hour testing budget (30 minutes of baseline warm-up followed by 30 minutes of EpiDroid enhancement).

  • Significant Coverage Boosts: EpiDroid consistently outperformed all extended baselines, improving average code coverage by 10.20% over Fastbot, 28.24% over LLM-Explorer, and 11.02% over LLMDroid.
  • Efficiency Multiplier: In the final 30 minutes of testing, replacing the baseline tool with EpiDroid delivered 3× to 4× more coverage gains than simply letting the baseline tool keep running.
  • Highly Practical Cost Profile: Thanks to a "sparse calling mechanism" (only invoking the LLM for high-level planning rather than every single click), EpiDroid's LLM cost remained incredibly low, averaging just $0.09 to $0.10 per application.

Limitations and Future Work

While highly effective, EpiDroid has clear boundaries:

  • WebView Opacity: It relies on standard Android Accessibility APIs to read the UI layout. Apps that heavily use embedded WebViews or custom rendering engines appear "opaque" to the system, limiting its ability to track state changes.
  • Silent Mutations: If an action mutates a state that doesn't immediately reflect as a visible attribute change in the UI hierarchy (like a silent background database write), EpiDroid's heuristic cannot capture it.
  • Environment Walls: Hard authentication walls (login screens) and hardware-gated features (like network scanning) still block deep exploration in emulated environments.

Future work aims to address these by integrating richer context signals, such as network responses and accessibility metadata.

Summary updated

BibTeX
@misc{song2026epidroid,
  author = {Jiahui Song and Jiaxin Zhi and Kangjia Zhao and Chen Zhi and Junxiao Han and Xinkui Zhao and Nan Wang and Shuiguang Deng and Jianwei Yin},
  title = {{EpiDroid: Dependency-Guided Recomposition for Deep State Discovery in Mobile GUI Testing}},
  year = {2026},
  eprint = {2604.01522},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.01522},
}
Figure