Improving Test Efficiency for Dynamic Layouts in Meituan App with XraySDK
The article explains how Meituan’s dynamic layout technology, which complicates automated testing, is tackled by XraySDK’s view‑ability transformation that captures layout data via a local HTTP server and custom listeners, boosting dynamic‑card test coverage from zero to over 80% and streamlining future WebView and compatibility testing.
This article describes how dynamic layout technology in Meituan's mobile app improves development efficiency but creates challenges for automated testing due to the need for multi‑endpoint verification. It presents a solution based on view‑ability transformation to enhance test efficiency.
Key Topics Covered :
Characteristics of Meituan App pages (multiple layouts such as single column, tab, double column).
Technical challenges in automation testing: inability to locate page elements, Appium element‑location principles, and the relationship between AccessibilityNodeInfo and Drawable.
View‑ability transformation using XraySDK, including:
Implementation details of the SDK components (Xray‑Client, Xray‑SDK, Xray‑Server).
Workflow: the app starts a local HTTP server, receives commands (e.g., http://localhost:8899/find/subview), forwards them to XrayDumper, serializes layout data to JSON, and returns it to the automation script.
Enhancements to view information such as clickability, long‑clickability, and other gestures.
Benefits: test coverage of dynamic cards increased from 0% to over 80%, with significant efficiency gains.
Future directions include applying the same view‑parsing principles to WebView element location and extending view‑ability transformation to other testing scenarios such as functional reliability and compatibility testing.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Meituan Technology Team
Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
