Loading…
Deep Dive into iOS Automation at Grab - Integration Testing
GrabSun Xiangxin
Summary
Grab replaced third-party cloud CI services with an in-house Xcode Server pipeline to run automated iOS integration tests across an expanding engineering team. Instead of performing fresh repository clones on shared cloud instances, Xcode Server pulls code incrementally and mirrors local developer configurations. The team automated testing bots through Ruby scripts and Arcanist hooks tied to Phabricator code reviews, dynamically provisioning bots on diffs and deleting them after merges. This architecture preserves step-by-step UI test execution logs and screenshots for easier failure diagnostics. To maintain stability on on-premises hardware, pre-integration scripts clear application cache states using simctl commands.
Context
Rapid team growth from 3 to 20 iOS engineers created automated CI bottlenecks, including persistent integration failures on Travis after iOS updates, slow support turnarounds, and insufficient visibility into UI test failures.
Approach / What changed
Grab built an in-house continuous integration workflow using Xcode Server, triggering and tearing down test bots via Ruby scripts and Arcanist hooks integrated with Phabricator.
Takeaways
- Xcode Server accelerates integration runs by pulling latest branch commits rather than executing fresh clones of the entire repository.
- Bot lifecycles can be automated via HTTP requests to the Xcode Server REST API and hooked directly into code review tools like Phabricator.
- Cached application builds persisting across integrations can be resolved by executing xcrun simctl uninstall in pre-integration scripts.
Related reading
Grab ·
Deep Dive into iOS Automation at Grab - Continuous Delivery
Grab manages continuous delivery for its iOS applications using four build configurations per target: Adhoc QA, Hot Dogfood, Dogfood, and Testflight. The engineering team moved away from Fastlane in favor of custom bash scripts under 100 lines that execute clean builds and archives via xcodebuild. To eliminate manual logins for build execution, Grab developed a server-side Swift application integrating SlackKit and a bot named Iris. Incoming Slack commands are parsed and scheduled onto a serial DispatchQueue to trigger the appropriate build scripts. Deployment and rollback of updates to Iris and its build scripts are handled through Capistrano.
Sun XiangxinGrab ·
Our Journey to Continuous Delivery at Grab (Part 1)
Around the end of 2018, Grab's backend architecture consisted of roughly 270 services managed through fragmented, manual deployment workflows. Engineers copied release parameters between build logs, wiki pages, Slack bots, and multiple Jenkins jobs, leading to high operational friction and an average of 10 business days between production updates for a service. To streamline delivery, Grab built Conveyor, an internal automation platform built on top of open-source Spinnaker. Conveyor introduced a custom user interface focused on pipeline visibility and a pipeline-as-code DSL called Artificer using Jsonnet files in the monorepository. The platform automatically registers build artifacts with commit metadata to eliminate manual parameter entry and automatically provisions integration, staging, and production pipelines.
Sylvain BougerelGrab ·
Enabling R8 optimization at scale with AI-assisted debugging
Grab experienced widespread Application Not Responding spikes across its Android superapp, driven by memory pressure and complex Jetpack Compose layouts embedded in legacy code. While switching to advanced R8 optimization promised significant performance gains, obfuscated stack traces and two-hour remote compilation cycles stalled investigation across nine million lines of code. To resolve this, engineers built Model Context Protocol tools to automate APK decompilation, deobfuscation, and code context extraction. The team paired these tools with an AI workflow that used the GitLab CLI to generate multiple solution branches and run verification builds in parallel. This strategy replaced hours of manual reverse engineering with minutes of automated analysis, allowing the team to debug and validate aggressive optimizations at scale.
Nguyen Van MinhGrab ·
Mockers - Overcoming Testing Challenges at Grab
Grab operates over 250 microservices communicating over HTTP and gRPC, making shared staging environments costly, ambiguous in ownership, and fragile due to inconsistent data and uncoordinated deployments. To address these testing bottlenecks, Grab created Mockers, a Go SDK and CLI tool backed by a central monorepo of mock servers for local-box and CI testing. Mockers automatically generates HTTP and gRPC mock servers from Swagger specifications and protobuf files, returning configured network responses without internal business logic. By incorporating Grab's in-house chaos SDK middleware, Mockers also enables repeatable resiliency and contract testing locally without relying on code-level mocks. While Grab still mandates integration testing on distributed staging environments with live data, Mockers enables developers to detect complex defects and contract mismatches earlier.
Mayank Gupta