Mobile Development 5 min read

Mobile UI Automation Framework for Xianyu App

The new mobile UI automation framework for the Xianyu app reduces script maintenance costs by using random monkey testing to record clicks and expected UI elements, organizing page‑specific scripts in MongoDB, executing them via Appium, and delivering data‑driven tests that doubled script count, achieved 98% pass rate, and cut update time from half a day to under an hour.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Mobile UI Automation Framework for Xianyu App

Background: UI automation is essential for improving test efficiency. The Xianyu UI automation faced high script maintenance cost, prompting a reduction in script investment.

Design: Leverages random monkey testing to record element clicks as operation steps, captures resulting UI elements as expected results, and organizes scripts by page dimension to limit scope.

Implementation: Uses Appium's getPageSource to obtain page XML, records page name (activity on Android, hook on iOS), stores element data, captures screenshots, and maintains a log of executed steps while avoiding duplicate clicks.

Script processing: Scripts are categorized per page and module, stored in MongoDB, and executed in a data‑driven manner. The framework includes device handling, case execution, and report generation showing success/failure, screenshots, and logs.

Results: Script count increased from 120 to 247, pass rate ~98%, covering 11 main pages. Updates now take under an hour versus half a day manually.

UI AutomationDatabasemobile testingappiumscript generationTest Framework
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

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.