Mobile Development 16 min read

Hydra: A Multi‑Device Control Tool for Mobile UI Compatibility Testing

This article introduces Hydra, a PC‑based tool that enables one‑controller‑multiple‑device (one‑machine‑multiple‑control) testing for mobile UI compatibility, detailing its background, design principles, core modules such as the group‑control engine, real‑time image streaming, high‑performance image algorithms, consistency repair, and deployment results within Baidu.

Baidu Intelligent Testing
Baidu Intelligent Testing
Baidu Intelligent Testing
Hydra: A Multi‑Device Control Tool for Mobile UI Compatibility Testing

Despite rapid advances in automated testing, manual testing remains essential for mobile UI compatibility due to high case‑building costs and stability issues. Traditional manual testing relies on human operation, with efficiency limited by tester skill.

The article first outlines Baidu's UI compatibility testing workflow, highlighting two stages: functional testing (1‑2 testers, 1‑3 devices, 10‑20 h) and pre‑release regression testing (1‑4 testers, 5‑12 devices, 20‑50 h). It then identifies two main problems: difficulty improving efficiency (e.g., testing 100 cases on 10 devices takes ~17 h) and insufficient coverage across device models, OS versions, and UI variants.

To address these challenges, Hydra introduces the concept of “one‑machine‑multiple‑control” (一机多控). A tester operates a primary “master” device, and the same actions are replicated simultaneously on multiple “slave” devices, optionally extending to cloud‑based devices to overcome physical device limitations.

Hydra’s architecture follows a BS model using HTTP/WebSocket for communication between the backend and front‑end display. Core components include the group‑control engine (handling input replication across devices) and the real‑time image stream (delivering synchronized device screenshots to the tester’s browser).

The group‑control engine solves coordinate mapping across different resolutions, synchronizes action execution order on heterogeneous devices, and maintains action timing queues to preserve user intent.

The real‑time image stream caps device frame rates at 16 fps, aggregates images from all devices, and uses a custom data protocol to compress and transmit combined frames, reducing bandwidth and front‑end callback overload.

Hydra employs a high‑performance multi‑scene image algorithm based on SIFT feature points, optimized by region cropping, weighted point selection, and adaptive parameter tuning (e.g., using CNN/DNN for scene detection). This achieves an average coordinate mapping latency of 160 ms with 97.52 % accuracy.

Consistency repair mechanisms detect and correct mismatched device states, especially during list scrolling, by weighting feature points across screen regions and applying corrective gestures automatically.

Hydra also supports mobile handheld control via two approaches: a remote‑control scheme that streams the master device’s screen to a browser on another device, and an Android client that captures touch events through a double‑layer floating window, replicating actions to all slaves while also executing them locally.

Deployed across multiple Baidu business lines (app regression, ad testing, operational activities), Hydra delivers weekly efficiency gains of 20‑70 %. Limitations include scenarios requiring multi‑account login, dynamic video backgrounds, long‑chain complex actions, and unsupported gestures like pinch‑zoom, which are under ongoing improvement.

Finally, the article proposes a toolbox concept to standardize manual testing workflows, integrating Hydra with test case management and bug tracking systems to further boost overall testing efficiency.

Automationmobile testingimage algorithmUI compatibilityhydramulti-device control
Baidu Intelligent Testing
Written by

Baidu Intelligent Testing

Welcome to follow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.