Implementing a 360‑Degree Quality Assurance System and Java Code Coverage Platform at Ctrip Hotel
The article describes Ctrip Hotel's evolution toward a 360‑degree quality assurance system, detailing its testing processes, continuous integration, performance testing, monitoring, and the design and features of a Java code‑coverage platform that integrates with existing CI and automation tools.
Author Wang Xingfu, a senior test development engineer at Ctrip Hotel R&D, shares the background and motivation for building a comprehensive quality assurance system as Ctrip migrates many frameworks to a Java stack.
The 360‑degree quality assurance system treats testing activities (unit, API, UI, job, functional) as a protective ring around the system under test, adding automated "guards"—including robots—to improve safety while managing cost.
Key components of the system include:
1. Unit Testing – complements automation by covering code paths not reachable by UI or manual tests.
2. Continuous Integration – integrates the hotel testing automation platform with Ctrip's release system, automatically executing test suites on each deployment and reporting results.
3. Integration Testing – supported by three platforms: Compass (test management), CAS (automation execution), and Click (testing tools).
4. Regression Testing – continues CI execution with strengthened test cases.
5. Performance Testing – offers both self‑service simple scenarios and complex, expert‑driven tests.
6. Monitoring & Alerting – provides log, performance, machine, and report monitoring to quickly detect and locate post‑release issues.
The article then introduces the Java Code Coverage Platform, explaining why coverage metrics are needed to quantify test completeness and effectiveness, contrasting requirement‑based and code‑based coverage.
Common coverage methods were evaluated but found insufficient, leading to the design of a new platform that integrates Jacoco, Sonar, and GitLab, collecting exec files via the Jacoco agent and analyzing them through Sonar's API.
Platform goals include ease of use, support for all testing stages, integration with automation, compatibility with existing release pipelines, and clear visualization of coverage data.
Key features of the platform are:
Coverage statistics for every testing phase from unit to system testing.
Black‑ and white‑list settings to focus coverage on specific code areas.
Static code analysis via Sonar for defect detection and coding‑style checks.
One‑click execution that triggers test runs, collects coverage, and generates reports.
Coverage data viewing in Sonar and storage via Sonar API for deeper analysis.
Scheduled tasks allowing automated coverage runs at defined times.
The system continues to evolve toward greater comprehensiveness, intelligence, and efficiency in the data‑driven, global internet era.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
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.
