Home · ASPLOS 2025 · Mobile, Edge & Embedded

TaOPT: Tool-Agnostic Optimization of Parallelized Automated Mobile UI Testing

Dezhi Ran, Zihe Song, Wenyu Wang, Wei Yang and Tao Xie

Conference
ASPLOS 2025
Published
2025
Pages
1251-1265
Citations
2

Testing clouds let you run an automated app-testing tool on many phones at once, but if each phone just runs the same tool independently they all waste time re-exploring the same screens — login, browsing, checkout — so the parallelism barely helps; this paper (Peking University and UT Dallas) builds TaOPT, a wrapper that watches any testing tool as it explores, spots the app's loosely-connected regions on the fly, and steers each device into a different region by disabling the doorways to the others — reaching the same coverage in 60 percent less time and finding up to twice as many crashes, without changing the tool at all.

The argument in one glance

  1. Problem

    Running a testing tool on many phones at once mostly repeats the same work

    Automated UI testing explores an app by generating taps and swipes, walking through its screens and the transitions between them, looking for crashes and covering as much code as possible. Testing clouds now offer large fleets of real phones and emulators, and mobile release cycles are short, so teams want to run this exploration in parallel across many devices to finish within the time they have. The obvious way is to launch the same testing tool on every device. But that barely helps, because the devices do not coordinate: each one independently wanders into the same popular functionalities — the login flow, the product browser, the checkout — so they redundantly re-explore identical screens instead of collectively covering more of the app. This overlapping exploration wastes most of the added devices. To make parallel testing actually pay off, the app's space of screens has to be divided so that each device explores a different part, with as little overlap as possible.

  2. What people did

    Divide the app up front using its static structure

    The natural way to split the work is to partition the app ahead of time by its visible structure — for instance, by static analysis of the code, or by the Android Activity components that back different screens — and assign each device a share. This mirrors how distributed computing statically divides a fixed workload across workers before the job starts.

  3. Why it fell short

    Static partitioning is inaccurate, tool-dependent, and needs information you do not have yet

    Static partitioning fails for three reasons. First, it is inaccurate at scale: real industrial apps are enormous and heavily obfuscated, so static analysis cannot recover a complete, correct map of the UI space, and one Activity component often implements several different functionalities, so partitioning by Activity is too coarse. Second, the right division depends not just on which screens exist but on how likely a given testing tool is to move between them, and those transition probabilities differ from tool to tool — so you must actually run the specific tool to learn the real structure. Third, and worst, to avoid redundant testing the division has to be decided during exploration, before the full UI space has ever been seen; but a partition based only on the local, partial information available so far can easily be wrong. So you are asked to partition a graph you can only observe a piece of, for a tool whose behavior you must measure live.

  4. This paper's idea

    Spot loosely-connected regions online, then steer each device into a different one

    TaOPT is a tool-agnostic wrapper that improves any testing tool's parallelization without touching the tool or the app. Its foundation is an observation: apps naturally break into loosely coupled UI subspaces — clusters of screens the tool rarely leaves once inside, because apps bundle relatively independent functionalities. Formulated as graph partitioning, these subspaces are globally sparse but locally dense, and the paper proves that because exploration lingers densely inside a subspace before crossing out, the local information seen so far is enough to identify the subspace correctly online. TaOPT watches the tool's screen transitions, runs an online algorithm to detect a subspace and its entryway, and then dedicates that subspace to one device while blocking its entryway on the others — steering each device into distinct territory, without knowing anything about how the tool works inside.

Why this problem is worth solving

The whole promise of a testing cloud is squandered if the devices duplicate each other’s work.

Automated UI testing models an app as a space of UI states connected by transitions — a graph the tool walks by issuing actions like taps and swipes, trying to cover code and trigger crashes. On a single device the goal is to explore that graph thoroughly. On a testing cloud with many devices, the goal shifts to dividing the exploration so the fleet covers more of the app in the same wall-clock time. The failure mode is overlapping exploration: when devices run the same tool independently, they each gravitate to the same prominent functionalities and re-walk the same screens, so ten devices do not do ten times the work — much of the extra capacity goes into redundant repetition. Effective parallel testing therefore reduces to a partitioning question: carve the UI space into decoupled parts and hand each device a different part. Unlike classical distributed computing, where a fixed workload is split statically before the job begins, the UI space here is discovered as it is explored and depends on the tool doing the exploring, which is what makes the partitioning genuinely hard.

The partition has to be found live, from partial information, for the specific tool in play.

Three properties of mobile UI spaces block any static, precomputed division. The structure cannot be read off the code: industrial apps are large and use obfuscation, so static analysis produces incomplete or wrong UI maps, and the code units one might partition by, such as Android Activity components, do not line up with functionalities — a single Activity can host many. The structure is also not tool-independent: the useful notion of the UI space includes the probabilities of moving between screens, and different testing tools explore with different probabilities, so two tools induce different couplings among the same screens, and the only way to get accurate information is to run the actual tool on the app. And the decision cannot wait: to avoid wasting devices on redundant exploration, the partition must begin before the whole UI space has been observed, using only the local information gathered so far. A partition made from a partial view can be wrong, yet a partition made too late is useless. Squaring that circle — a correct division from local, online, tool-specific information — is the technical heart of the problem.

What people did before, and where it broke

  • Independent parallel runs (no coordination). Launch the same tool on every device and let each explore freely. Where it broke. The devices redundantly re-explore the same popular functionalities, so overlapping exploration wastes most of the added capacity and coverage barely improves with more devices.
  • Static-analysis partitioning. Analyze the app’s code ahead of time to map the UI space and split it. Where it broke. Real industrial apps are huge and obfuscated, so static analysis cannot recover a complete or accurate UI-space structure to partition.
  • Activity-component partitioning. Divide the app by its Android Activity components, assigning each device some Activities. Where it broke. Activities do not correspond to functionalities — one Activity often implements several — so the division is too coarse and mis-cuts real functional boundaries.
  • Borrow static workload division from distributed computing. Treat it like splitting a fixed dataset across workers before the job starts. Where it broke. The UI space is not known up front; it is revealed only as the tool explores, and its coupling depends on the tool, so there is nothing fixed to divide statically.
  • The gap. No approach could divide the UI space effectively while it was still being discovered, for the particular tool in use, without modifying that tool. Detecting loosely coupled subspaces online and steering any tool into distinct ones is what TaOPT contributes.

How TaOPT works

Detecting loosely coupled regions live and steering devices apart

  1. new

  2. new

  3. new

  4. new

  5. new

The idea

Turn parallel testing into an online graph-partitioning problem, and exploit the app’s block structure to solve it. TaOPT’s foundation is a formalization: model the tool exploring the app as a random walk on a weighted directed graph, where minimizing wasted overlap between devices is exactly minimizing the probability of transitions that cross between the parts of a partition — the minimum-conductance graph-partitioning problem. That problem is NP-hard in general, but real app graphs are not general: the study finds they are globally sparse and locally dense, made of tightly-knit functional clusters joined by a few rare links. Dividing a graph that decomposes into weakly-connected dense clusters, and assigning the pieces so parallel workers do not tread on each other, is the same structural move the work on batch-level graph partitioning for large-scale training covered elsewhere on this site makes, cutting a graph along its sparse seams so that the dense pieces can be worked on independently.

Prove that watching a little is enough, because exploration gets trapped before it escapes. The distinctive challenge is that the partition must be committed before the whole graph is known. TaOPT’s theoretical contribution is to show this is safe given the block structure: if a subspace is a dense cluster connected to the rest by only rare cross-transitions, then a walk entering it will circulate inside long enough — provably, after about n-squared times log n steps, by standard concentration bounds — that the observed frequencies of internal versus crossing transitions separate cleanly, revealing the boundary with high probability. In other words, because the tool lingers densely inside a functionality before slipping out, by the time it is poised to leave you have already seen enough of that functionality to recognize it as a subspace, so local information is enough. The online algorithm operationalizes this, scoring each screen by how much the exploration before and after it overlap to locate the entryway into a freshly-discovered subspace. Systematically exploring a large behavioral space and extracting structure from the trace as it unfolds, rather than from a static model, is the same online, observe-as-you-go discipline the work on greybox fuzzing for concurrency testing covered elsewhere on this site follows, learning the shape of the space from the exploration itself.

Steer any tool from the outside by controlling the doorways, changing nothing inside. The practicality of TaOPT comes from never modifying the testing tool or the app. It observes through the Toller framework, which reports each UI action and its surrounding screen, and it controls through the same framework, disabling the UI elements that form a subspace’s entryway on the devices not assigned to it, the instant those elements appear — so the tool, following its own logic, simply never sees the door and stays in its lane. This lets one mechanism improve Monkey, Ape, or WCTester alike, treating each as a black box. Wrapping an existing, unmodified testing tool in an outer layer that guides where it spends its effort — enhancing it without reaching into its internals — is the same non-intrusive augmentation strategy the work on a learned white-box mutator for kernel fuzzing covered elsewhere on this site adopts, bolting a smarter controller onto a tool it deliberately leaves unchanged.

Following an app through TaOPT

Splitting a shopping app between two devices

A trace, following the paper's motivating example, of how TaOPT keeps two devices from re-exploring the same screens.

Step 1 of 5

One device begins exploring the whole app

A shopping app has two loosely connected functionalities: the main shopping flow (browsing, cart, checkout) and account settings, joined only through a single Account tab. A first device starts running the testing tool, and TaOPT's trace analyzer watches every screen and action it produces.

Without coordination, a second device launched now would redundantly re-explore the shopping flow.

Why it works

  • App UI spaces genuinely have block structure. In principle the UI graph could be arbitrarily tangled → but real apps bundle relatively independent functionalities into dense clusters joined by rare transitions, which the study confirms → so there are real loosely coupled subspaces to separate, and cutting along them removes almost all redundant overlap.
  • Local density makes an online partition provably safe. Committing a partition before seeing the whole graph is risky → but when a subspace is dense and its exits are rare, a walk circulates inside it long enough that observed transition frequencies expose the boundary within about n-squared times log n steps → so the split found from local information is correct with high probability.
  • Overlap is exactly the conductance being minimized. It is unclear a priori what “wasted parallelism” formally means → but modeling testing as a random walk makes redundant overlap equal to the probability of transitions crossing between parts → so reducing overlap is precisely minimizing graph conductance, giving the objective a rigorous target.
  • Controlling doorways steers a tool without knowing its internals. Guiding a black-box tool seems to require modifying it → but disabling the UI elements that form a subspace’s entryway prevents the tool from ever entering, whatever its internal logic → so one mechanism steers Monkey, Ape, and WCTester alike, keeping it tool-agnostic.
  • Watching the live tool captures tool-specific coupling. Static structure misses that different tools couple screens differently → but the trace analyzer measures the actual transitions the running tool produces → so the identified subspaces reflect how this tool really explores, not a generic guess, and steering preserves over 95 percent of its reachable methods.

What it costs (trade-offs and scope)

  • It depends on apps having loosely coupled structure. TaOPT’s gains and its theoretical guarantee rest on the globally-sparse, locally-dense property; an app whose functionalities are densely interconnected offers little to partition, and the proof itself is for an idealized model of dense clusters joined by a rare cross-edge.
  • It relies on an instrumentation framework and is Android-specific. Both observing UI actions and disabling entryway elements go through the Toller framework on Android UI hierarchies; the approach assumes that instrumentation is available and works, and does not itself address other platforms.
  • Steering by blocking entryways is coarse and imperfect. Confining a tool by disabling matched entryway elements is a black-box control that can miss alternative paths into a subspace or have side effects, and behavior is preserved to over 95 percent of reachable methods — high, but not all; some coverage the tool would reach on its own is lost.
  • Key timing parameters are empirically tuned. The minimum exploration times before accepting a subspace (about five minutes in resource-constrained mode, one minute with two-instance cross-validation in duration-constrained mode) and the de-allocation timeout are set by experiment, not derived, and different apps or tools may want different values.
  • It optimizes parallelization, not the underlying tool. TaOPT reduces overlap among devices; it does not improve a tool’s single-device test generation, so it helps only when there is parallelism to coordinate and redundant overlap to remove, and it was evaluated on 18 Android apps with three tools rather than across all app or tool types.

The evaluation

Parallelizing automated UI testing across a device fleet

PropertyIndependent parallel runsStatic / Activity partitioningTaOPT
How the UI space is divided
Tool modification required
Overlapping exploration
Resources to reach the same coverageBaselineMarginal
Effect at equal resourcesBaselinen/a
From the paper's evaluation on 18 popular industrial Android apps with three state-of-the-art tools (Monkey, Ape, WCTester). TaOPT reaches comparable code coverage with about 60 percent less testing duration and 62 percent less machine time, detects 1.2 to 2.1 times more unique crashes at equal resources (1.64 times on average), cuts overlapping exploration by 68.9 percent on average, and preserves each tool's behavior by covering over 95 percent of the methods it reaches without TaOPT.Underlined values explain themselves when clicked.

Check yourself

Check your understanding

  1. 1. Why does simply running the same UI testing tool on many devices fail to speed up testing much?

  2. 2. Why can the app's UI space not simply be partitioned statically ahead of time?

  3. 3. What is TaOPT's key insight and guarantee, and how does it steer tools?

  4. 4. What did TaOPT achieve, and what are its limits?

Sources

The paper is “TaOPT: Tool-Agnostic Optimization of Parallelized Automated Mobile UI Testing” by Dezhi Ran, Zihe Song, Wenyu Wang, Wei Yang, and Tao Xie (Peking University, University of Texas at Dallas, and University of Illinois at Urbana-Champaign), published at ASPLOS 2025 (Volume 2), DOI 10.1145/3676641.3716282.

This explainer is written from the full text of the authors’ version. Everything above comes from the paper’s own sections: the introduction and motivating example on parallel automated mobile UI testing across testing clouds, overlapping exploration as the core waste, and why static partitioning by code structure or Android Activity components fails for large, obfuscated apps, why the right division depends on each tool’s transition probabilities, and why it must be decided online from local information; the formulation of effective parallelization as an online minimum-conductance graph partitioning problem on a weighted directed graph of UI states and tool-induced transition probabilities, minimizing the probability of edges crossing between parts; the definition of loosely coupled UI subspaces and their globally-sparse, locally-dense property, and Theorem 1 with its proof sketch, showing that for dense subgraphs joined by a rare cross-edge, on the order of n-squared times log n exploration steps make internal transition frequencies dominate the cross-edge frequency (via Chernoff/Hoeffding bounds), so the partition is identifiable online from local information; the TaOPT design with a trace analyzer built on the Toller framework running the online FindSpace algorithm to score screens by overlap and locate a subspace entryway, and a test coordinator that dedicates each subspace to one device and enforces entryways by disabling the matching UI elements on other devices through Toller, with duration-constrained and resource-constrained modes and their parameters (about five-minute and one-minute minimum exploration times with two-instance cross-validation, and a one-minute de-allocation timeout); and the evaluation on 18 popular Android apps with Monkey, Ape, and WCTester, reporting comparable coverage with about 60 percent less testing duration and 62 percent less machine time, resource savings of 65.9, 50.1, and 65.9 percent for the three tools, 14.6 percent more methods and 1.64 times more unique crashes at equal resources (1.2 to 2.1 times across tools), 68.9 percent average reduction in overlapping exploration (90.1 percent for Ape), and preservation of over 95 percent of the tools’ reachable methods.

Related papers on Mobile, Edge & Embedded

See all 111 →