Systematic CI Capability Construction for Xianyu Mobile Development
By systematically building a macOS‑enabled Jenkins cluster, integrating Flutter UI automation, FeiFish CLI triggers, and mandatory CI‑gated code reviews, Xianyu transformed its expanding mobile team’s workflow, achieving over 80% test coverage, rapid null‑safety migration, and turning continuous integration into a core efficiency driver.
Since its founding in 2014, Xianyu has grown into a large‑scale mobile app, facing typical challenges such as reduced development efficiency due to team expansion and code decay from legacy code.
Initial Challenges
The project started with three major obstacles: insufficient infrastructure for client‑side CI, high execution cost, and entrenched misconceptions about testing (e.g., "unit tests are useless").
Cost vs. Benefit Analysis
Automation reduces the uncertain future cost of regression and bug fixing by shifting it to a deterministic upfront investment in unit and UI tests.
Deterministic Benefits
Early problem detection saves repeated regression effort and coordination overhead, leading to lower overall development cost.
New Opportunities
Flutter’s widget‑test capability enables UI automation without building the app or using real devices, dramatically cutting test execution time (e.g., 5 s vs. 35 min for a comparable scenario).
Reasonable Goals
The project set three principles: feasibility without administrative pressure, maintainability through mechanisms that prevent regression, and sustainability focused on real efficiency gains.
Capability Building
Self‑built Jenkins Cluster : Customized to support macOS for golden‑file tests, dedicated resources for heavy‑load tasks, and cached dependencies to accelerate CI runs.
UI Automation : Integrated with Ant Group’s real‑device platform to cover core functionality regression, performance collection, and critical event verification.
FeiFish & CLI Integration : Tightly coupled CI triggers and gate‑keeping in the development pipeline, providing real‑time feedback and digital monitoring of CI tasks.
CI & Code Review Integration
Mandatory code review (CR) now requires CI pass, reducing redundant manual checks and improving code quality.
Coverage Strategy
Prioritize discovery efficiency, adopt layered coverage (core → edge), and focus on unit‑test coverage first, using UI automation as a supplement.
Results
Eight core Flutter repositories achieved >80% line coverage; key business modules reached 80%+ P0 test coverage. CI enabled rapid migration to null‑safety and class‑trunk development, with over 1 152 tests supporting 400+ commits in a month.
Conclusion
Systematic CI construction transformed Xianyu’s development culture, turning CI from an optional practice into a fundamental efficiency driver across the organization.
Xianyu Technology
Official account of the Xianyu technology team
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.