APP DIFF Automated Testing Solution for iQIYI Mobile Apps
The APP DIFF automated testing solution, presented at iQIYI’s i Technology Conference, combines deep‑link navigation, mock data services, and the AUI image‑diff algorithm within the Uiautomator2 framework to stabilize UI automation, cut execution time, achieve near‑human verification quality, and deliver significant coverage and cost savings across iQIYI mobile products.
On August 7, iQIYI's technology product team held the 17th "i Technology Conference" in collaboration with TesterHome. The theme was "Intelligent and Precise Testing Frontiers". Experts Qi Wenfang and Wei Zhenzhen presented the "APP DIFF Automated Solution".
The APP DIFF solution leverages deep links, mock services, and the AUI image‑matching algorithm to improve UI automation stability and efficiency, achieving near‑human verification quality for features such as favorites and cards. It has been deployed in several iQIYI mobile products, delivering cost‑effective, continuous benefits.
Background
Current mobile automation at iQIYI is summarized by four dimensions: element identification (ID, TEXT, OCR, AI), case conversion (record‑playback platform, data templates, code generation, smart traversal), execution environment (local → Jenkins → self‑built cloud testing platform → CI pipelines), and application scenarios (smoke, gray‑release, plugin acceptance, full‑suite integration). Major pain points include instability caused by UI changes, backend data variations, network fluctuations, and limited verification capability due to reliance on single‑point IDs and text checks.
Three optimization ideas were identified: shorten case step length, control data for higher stability, and introduce image‑based verification to approach manual validation.
Solution Design
The APP DIFF scheme is built on the Uiautomator2 framework and integrates three core technologies:
Deep Link : Directly launches target pages, improving stability and efficiency.
Mock : Reduces instability caused by data changes across the entire link.
AUI : Provides precise image‑diff verification, bringing validation closer to human perception.
In the "base" task, test data are recorded, baseline screenshots are uploaded to the AUI service, and during the test task the recorded data are replayed and compared with the baseline images.
Deep Link Introduction
Deep links encode parameters in a URL to open specific internal app pages. iQIYI customizes a "registration" concept to define a cloud‑to‑business communication protocol, which is transformed into URL schemes (Android intents) for direct page navigation.
Data Construction
Local data (SharedPreferences, databases, files) are accessed by ensuring identical signatures and ShareUserID between the test and target apps. Mock services capture and replay network traffic using a VPN‑based proxy, enabling stable network data for tests.
AUI Verification
AUI offers four matching modes: precise, strict, grayscale, and layout. Strict matching detects fine visual differences; layout matching focuses on structural consistency, ignoring content changes.
Implementation Guidelines
When writing cases, construct local data in pre‑conditions, perform AUI verification, and restore data afterward. The workflow separates author‑defined steps (blue) from framework‑handled steps (gray).
Business Deployment
iQIYI applied the solution to the fast‑track app, achieving a 20% stability increase and halving execution time for favorite and history modules. Card‑type business was also automated: data are harvested, cleaned, mocked, and validated via APP DIFF, resulting in >70% coverage, >95% stability, and near‑zero manual scripting cost.
Future Plans
iQIYI aims to enhance precise traversal (click optimization, feature de‑duplication) and intelligent analysis (automatic failure classification, monitoring, and tagging). Continued improvements to AUI algorithms—including edge detection, projection‑based layout matching, and deep‑learning‑driven object detection—will further reduce maintenance costs and broaden applicability.
iQIYI Technical Product Team
The technical product team of iQIYI
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.