7 Key Insights Into DoorDash's Migration From XCTest to Swift Testing With Copilot

From Xshell Ssh, the free encyclopedia of technology

Software testing is the backbone of reliable mobile apps, but maintaining a legacy test suite can slow down innovation. When DoorDash decided to modernize their iOS testing framework from XCTest to Swift Testing, they turned to an unusual ally: GitHub Copilot. According to DoorDash engineer Matheus Gois, the migration was not only fast but also remarkably safe, thanks to a combination of AI assistance and rigorous reliability safeguards. The result? A leaner, faster test suite that sets a new standard for quality assurance at scale. In this article, we break down the seven most important things you need to know about this cutting-edge migration—from the rationale behind the switch to the concrete performance gains that followed. Whether you're a mobile developer, a QA engineer, or a tech leader looking to modernize your testing pipeline, these insights offer practical lessons that you can apply to your own projects.

1. The Burning Need for a Modern Test Framework

DoorDash’s iOS test suite had been built on XCTest, Apple’s original testing framework. While XCTest served them well for years, it began to show its age as the codebase grew and testing requirements became more complex. Developers struggled with slow test execution, verbose boilerplate, and limited support for modern Swift features. Swift Testing, introduced more recently by Apple, promises a cleaner syntax, better integration with Swift concurrency, and faster feedback loops. For a company that deploys multiple times a day, shaving even a few seconds off each test run adds up to huge productivity gains. The migration was therefore not a luxury but a strategic necessity to keep pace with DoorDash’s rapid growth.

7 Key Insights Into DoorDash's Migration From XCTest to Swift Testing With Copilot
Source: www.infoq.com

2. Why Copilot Was the Right Tool for the Job

Manually rewriting thousands of test cases from XCTest to Swift Testing would have been prohibitively time-consuming and error-prone. That’s where GitHub Copilot came in. Using Copilot’s AI-powered code suggestions, DoorDash engineers were able to automate much of the heavy lifting. The tool studied existing XCTest patterns and generated equivalent Swift Testing code in real time. However, Copilot wasn’t used blindly—every suggestion was reviewed and tested. The key was to integrate Copilot into a workflow that emphasized correctness over speed, turning the AI into a productivity multiplier rather than a liability. Matheus Gois noted that Copilot’s familiarity with both XCTest and Swift Testing idioms made it uniquely suited for this kind of cross-framework migration.

3. Reliability Safeguards That Made It Safe

To ensure that not a single test broke during the transition, DoorDash implemented a multi-layered safety net. First, they ran both the old and new test suites in parallel for every change, comparing results automatically. Second, they used code review practices that required human verification of any AI-generated code that touched critical test logic. Third, they set up a gradual rollout: the migration was done module by module, with each module’s tests needing to pass consistently before moving to the next. These safeguards prevented regressions and gave the team confidence that Copilot’s output was reliable. Without such measures, the speed of AI-driven migration could have introduced subtle bugs into the test infrastructure.

4. The Performance Gains That Matter

The measurable results speak for themselves. After the migration, DoorDash observed a significant reduction in test execution time—in some cases by over 30%. Swift Testing’s built-in support for async/await and structured concurrency allowed tests to run more efficiently on Apple’s hardware. Additionally, the new framework eliminated redundant boilerplate, making tests easier to read and maintain. But performance wasn’t just about speed; the team also reported faster debugging cycles because Swift Testing provides clearer failure messages and better integration with Xcode’s testing interface. For a mobile team that runs thousands of tests for every pull request, these improvements translated directly into shorter developer wait times and quicker feedback loops.

7 Key Insights Into DoorDash's Migration From XCTest to Swift Testing With Copilot
Source: www.infoq.com

5. Challenges They Encountered and Solved

No migration is without hurdles. One major challenge was dealing with legacy test patterns that didn’t have a direct equivalent in Swift Testing. For instance, some XCTest-specific APIs like XCTestExpectation required careful rethinking when converting to Swift Testing’s expect() and #expect() macros. The team also had to update test harnesses and custom assertion helpers to be compatible with the new framework. Another pain point was handling asynchronous tests that relied on older run loop patterns. To solve these, DoorDash engineers created a set of migration guidelines and shared them across the team. Copilot was particularly helpful in suggesting modern replacements for outdated patterns, though human oversight remained essential to validate correctness.

6. What Developers Love About the New Setup

After the migration, developer sentiment turned overwhelmingly positive. The simplicity of Swift Testing’s syntax—requiring fewer lines of code for the same test logic—was a huge win. Developers also appreciated the natural integration with Swift’s async/await model, allowing them to write more readable and maintainable asynchronous tests. The reduced execution time meant less context switching and fewer interruptions. Moreover, the new test suite encouraged better testing practices because the framework’s design nudges developers toward writing more focused, isolated tests. As one DoorDash engineer put it, “It’s like going from driving a manual transmission to an automatic—everything just becomes smoother and more intuitive.”

7. Lessons for Any Team Considering a Test Suite Rewrite

DoorDash’s experience offers a blueprint for teams thinking about modernizing their test infrastructure. First, don’t underestimate the power of AI assistance, but always pair it with strong quality gates. Second, take an incremental approach—rewrite modules one at a time and keep the old system running until the new one is proven. Third, invest in clear documentation and migration guides to reduce cognitive load on developers. Fourth, measure everything: execution time, failure rates, and developer satisfaction. Finally, remember that the goal isn’t just to use the latest framework, but to improve the overall developer experience and release velocity. By following these principles, any team can navigate a test suite migration with confidence and achieve the same kind of performance gains that DoorDash now enjoys.

In conclusion, the migration of DoorDash’s iOS test suite from XCTest to Swift Testing, powered by GitHub Copilot, stands as a compelling case study in modern software engineering. It demonstrates that with the right tools and a disciplined approach, large-scale automated test rewrites can be both fast and safe. The key takeaway? Don’t be afraid to embrace AI in your testing workflows—but always keep a human in the loop.