Overview of Ctrip Automation Platform (CAP): Architecture, Implementation, and Usage
This article introduces Ctrip Automation Platform (CAP), detailing its architecture, Java‑based implementation with TestNG, Appium, AngularJS, Jenkins, and Maven, the workflow for creating projects and running mobile, UI, and API tests, recent usage statistics, and planned reporting improvements.
Author: Luo Nianjie, Senior Test Engineer in Ctrip's System R&D department, responsible for test tool development and framework maintenance.
CAP Architecture and Principles Ctrip Automation Platform (CAP) is a company‑wide automated testing platform built with Java, using TestNG and Appium for test execution, AngularJS for the front‑end, Maven for project management, and Jenkins for continuous integration. It supports three CI environments: Mobile, UI, and API.
CAP Implementation The front‑end, called APS (Automation Platform as Service), allows users to create new projects, which triggers an MQ message. A Git repository is created from a template, permissions are granted, and a CI project is provisioned via CAP‑API. Users clone the repo, write test cases using the provided template, and commit them back. The CI system schedules execution on a slave cluster, storing execution records in a database. APS displays these records, including pass/fail/warning counts and detailed logs.
APS provides three automation entry points and a benchmark entry for mobile performance testing, supporting Android and iOS with Java or C# test scripts. The platform also offers API recording and playback, and integrates with Testrail for automated case management.
After project creation, the Git repo and CI are automatically linked; users download the project, develop cases, and push them back. CI can be scheduled to run the cases, and results are displayed on APS.
The recent execution results page shows a summary of runs with pass/fail/warning counts and allows users to view detailed logs.
Report Improvements Current analysis reports are time‑consuming, requiring manual navigation to error details and manual statistics. To address this, CAP now crawls execution logs, classifies them, extracts error reasons per case, and provides 18 error categories for faster troubleshooting.
Current Usage CAP has been deployed at scale across the company, with usage statistics shown in the accompanying charts.
Readers are invited to leave comments, share knowledge, or contribute articles.
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.
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.