Mobile Development 5 min read

Overview of XTS Mobile UI Automation Framework and Its New Features

The article introduces XTS, an image‑comparison based mobile UI automation framework built on Appium, explains its architecture, case writing examples, and highlights new 2.0 features including one‑click compatibility testing, image‑based clicking, and dynamic ad‑ignoring through diff analysis.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Overview of XTS Mobile UI Automation Framework and Its New Features

XTS is an image‑comparison based mobile UI automation framework developed at Qunar, used across multiple business units for client functional testing.

It operates by capturing screenshots of released app versions as baselines; when a new client build is submitted for testing, XTS automatically triggers tasks, captures new screens, compares them to the baselines, and flags any unexpected visual differences (diffs) as bugs. The framework is built on top of the Appium tool.

Typical test cases are written in Python-like scripts. For example:

self.open_schema_android('501') opens the schema page with ID 501, and

self.click_by_id('com.mqunar.atom.hotel:id/atom_hotel_txCity') clicks the element whose ID is atom_hotel_txCity . Another example uses an XPath selector to click the "Shanghai" text: self.click_by_xpath('//android.widget.TextView[contains(@text,"上海")]') .

The XTS architecture consists of a master‑slave pair of HTTP services for device management, where the master can control many slaves in a one‑to‑many relationship, enabling distributed phone management. An html/ajax+java backend implements task scheduling, and a job_control HTTP service downloads and executes test cases. During recording, an agent captures requests and backend data; during playback, the recorded responses are replayed, ensuring data consistency without contacting the real backend.

New features in XTS 2.0 focus on three areas:

1) One‑click compatibility testing – By selecting the top‑20 device models on the task management platform and choosing the “compatibility” option, the system runs the full suite of cases on each device automatically.

2) Image‑based clicking – This feature addresses situations where hybrid or React‑Native controls cannot be reliably located, such as the “100元度假红包” image, by matching a small reference image within the larger screen and clicking at the calculated coordinates.

Case demo for image clicking shows how the framework captures a small image, computes its position in the full screenshot, and performs a click based on that coordinate.

3) Dynamic ad ignoring – By recording two runs of the same flow and computing the visual diff, the framework identifies regions that change (e.g., ads) and marks them as ignorable. During actual testing, these regions are excluded from comparison, preventing false‑positive diffs caused by dynamic advertisements.

Overall, XTS provides a robust, image‑driven automation solution for mobile apps, supporting scalable compatibility testing, precise image‑based interactions, and intelligent handling of dynamic UI elements.

UI Automationmobile testingframeworkappiumimage comparisoncompatibility testing
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

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.