Mobile Development 15 min read

Meituan Technical Salon #77: Client‑Side Robustness Testing via Interface Data Mutation for Billion‑Traffic Systems

Meituan’s Technical Salon #77 presented a client‑side robustness testing framework that mutates API responses using semantic rules, injects them via a proxy, and detects crashes or hangs through static code scans and dynamic monitoring, employing array‑deduplication techniques to cut test volume while maintaining coverage, now deployed in Meituan and Youxuan apps.

Meituan Technology Team
Meituan Technology Team
Meituan Technology Team
Meituan Technical Salon #77: Client‑Side Robustness Testing via Interface Data Mutation for Billion‑Traffic Systems

In the Meituan Technical Salon #77 talk, robustness is defined as a system’s ability to handle errors and continue normal operation despite abnormal inputs or environmental stress, drawing on definitions from Wikipedia, IEEE, early fuzz testing (Barton Miller, 1989) and the Ballista project (1996). For mobile apps, robustness means the client can keep running when faced with environmental or input anomalies such as memory shortage, high CPU load, network failure, or malformed data returned from APIs.

Analysis of historical faults in Meituan’s platform showed that the majority of crashes and core‑function failures stem from unexpected network‑response data, making client‑side robustness testing a priority. The proposed solution centers on mutating the original API response according to semantic rules, injecting the mutated data via a proxy, and detecting crashes, hangs, or functional abnormalities on the device.

The detection scheme combines static and dynamic components. Static detection uses custom code‑scanning rules (e.g., PrimitiveParseDetector, ColorParseDetector) to enforce safe usage of utility classes and manage technical debt. Dynamic detection constructs mutated data, injects it at appropriate trigger points (integration/regression events), and monitors the app for abnormal behavior.

A key challenge is generating comprehensive yet manageable mutation data. The team performed semantic analysis of response values—distinguishing colors, URLs, image resources, etc.—and defined initial mutation rules based on boundary values and observed production issues, later enriched with real‑world fault data.

To curb the exponential growth of test cases, two optimization strategies were applied: (1) when array elements share identical structure, assign distinct mutation values to each element and discard redundant combinations; (2) for structurally varied arrays, compute edit distance between nodes, convert it to a 0/1 similarity matrix, apply union‑find to group similar nodes, and pick one representative per group for mutation. These tactics reduced the generated test suite by roughly 40% without losing coverage or defect‑detection ability.

The resulting tool has been integrated into both Meituan and Youxuan apps. It can be triggered manually for new features, automatically upon component changes, or as part of bi‑weekly regression runs. Over one year of use, the approach has uncovered dozens of robustness issues.

Future work includes enriching the mutation model with more data and environment types, improving detection capabilities, and exploring smarter, AI‑driven test‑case generation to further boost efficiency.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

mobile testingrobustnessFault Injectiontest optimizationclient-side qualitydata mutation
Meituan Technology Team
Written by

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.

0 followers
Reader feedback

How this landed with the community

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.