Operations 9 min read

Automated Monitoring and Validation of JD.com Android Channel Packages

This article describes how JD.com implements an automated system to monitor Android channel packages across multiple app stores, using a PHP/CodeIgniter front‑end, Java services with Selenium, Walle for channel information extraction, and email notifications to ensure correct package release and reduce economic loss.

JD Retail Technology
JD Retail Technology
JD Retail Technology
Automated Monitoring and Validation of JD.com Android Channel Packages

Background

JD.com has numerous testing tools, but limited monitoring for Android channel packages released to various app stores. Different store review speeds cause package capture issues, leading to economic loss for JD. Monitoring the channel number, sub‑alliance ID, download speed, version, build number, and release date for major stores (Meizu, 360, Baidu, Xiaomi, Huawei) is required.

Architecture Diagram

Technical Implementation

Application Layer : Built with PHP CodeIgniter and Bootstrap to display monitoring data, support queries, and show channel package size trends.

Figure 1 – Channel Package Monitoring List

Figure 2 – Channel Package Size Trend

Service Layer : Implemented in Java, relying on Selenium, TestNG, and Log4j.

Selenium automates browser actions to simulate a user navigating each app store, searching for “京东”, extracting channel information via XPath, downloading the package, measuring size and speed, and verifying channel data with walle-cli-all.jar.

Key steps:

Open the Xiaomi app store (http://app.mi.com/).

Search for “京东” and locate channel information using XPath.

Click download and start a thread to monitor completion.

After download, calculate package size and download speed.

Use

java -jar walle-cli-all.jar show com.jingdong.app.mall_9.1.6_84884.apk

to retrieve channel metadata.

Walle (瓦力) adds custom channel data into the APK Signature V2 block, enabling efficient channel package generation and verification.

Extracted channel data is compared against pre‑stored Excel records to validate correctness, then an email with the results is sent to relevant personnel, and the information is stored via API calls.

Relevant Code Snippet

@Test(description = "小米应用市场")
public void testXiaomi() throws Exception {
  try {
    SystemHelper.createDir(downloadFilepath);
    SystemHelper.deleteDir(downloadFilepath);
    GlobalVariable.isPkgExist = false;
    driver.get("http://app.mi.com/");
    driver.manage().window().maximize();
    driver.findElement(By.xpath("/html/body/div[@class='menu']/div[@class='container']/div[@class='search-form']/form[@id='search']/input[@id='keyWord']")).sendKeys("京东");
    SystemHelper.sleep(2);
    driver.findElement(By.xpath("/html/body/div[@class='menu']/div[@class='container']/div[@class='search-form']/form[@id='search']/button[@id='searchSubmit']/i[@class='icon-search']")).click();
    SystemHelper.sleep(2);
    driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='main-con']/div[@class='applist-wrap'][1]/ul[@class='applist']/li[1]/h5/a")).click();
    SystemHelper.sleep(2);
    driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='app-intro cf']/div[@class='look-detail']")).click();
    SystemHelper.sleep(2);
    // pkgInfo.setPkgSize(driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='app-intro cf open-dropdown-toggle']/div[@class='look-detail']/div[@class='details preventDefault']/ul[@class=' cf']/li[2]")).getText());
    SetPkgInfo.pkgInfo.setPkgUpdateDate(driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='app-intro cf open-dropdown-toggle']/div[@class='look-detail']/div[@class='details preventDefault']/ul[@class=' cf']/li[6]")).getText());
    SetPkgInfo.pkgInfo.setPkgVersion(driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='app-intro cf open-dropdown-toggle']/div[@class='look-detail']/div[@class='details preventDefault']/ul[@class=' cf']/li[4]")).getText().trim());
    driver.findElement(By.xpath("/html/body/div[@class='main']/div[@class='container cf']/div[@class='app-intro cf open-dropdown-toggle']/div[@class='app-info']/div[@class='intro-titles']/div[@class='app-info-down']/a[@class='download']")).click();
  }
}

Conclusion

The automated verification process enables JD.com to reliably monitor Android channel packages, ensure correct channel metadata, and reduce economic loss caused by inconsistent store reviews, while also providing a practical learning example of Selenium‑based testing.

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.

JavaAndroidSeleniumChannel Monitoring
JD Retail Technology
Written by

JD Retail Technology

Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.

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.