How DoorDash Modernized Its iOS Test Suite with Copilot and Swift Testing

By ● min read
<p>DoorDash recently undertook a significant modernization of its iOS testing infrastructure, migrating from the long-standing XCTest framework to the newer Swift Testing framework. This transition was accelerated through the use of GitHub Copilot, which helped rewrite thousands of test cases while maintaining reliability. In this Q&A, we explore how the team achieved this migration quickly and safely, with measurable performance improvements.</p> <h2 id="q1">What prompted DoorDash to migrate from XCTest to Swift Testing?</h2> <p>DoorDash's mobile engineering team sought to modernize their testing stack to keep pace with evolving iOS development practices. XCTest, while reliable, had become less efficient over time, especially for large test suites. Swift Testing emerged as a more modern alternative, offering native Swift syntax, better integration with Xcode, and improved performance characteristics. The team recognized that migrating to Swift Testing could reduce test execution time, simplify test maintenance, and leverage new language features like async/await for more readable and concurrent test flows. By making this move, DoorDash aimed to align their testing framework with current best practices, ultimately speeding up development cycles and improving developer experience.</p><figure style="margin:20px 0"><img src="https://res.infoq.com/news/2026/05/doordash-copilot-swift-testing/en/headerimage/doordash-copilot-swift-testing-1777887802258.jpeg" alt="How DoorDash Modernized Its iOS Test Suite with Copilot and Swift Testing" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: www.infoq.com</figcaption></figure> <h2 id="q2">How did GitHub Copilot play a role in the migration process?</h2> <p>GitHub Copilot served as a crucial productivity tool during the migration. Matheus Gois, the engineer leading the effort, explained that Copilot helped automatically convert thousands of XCTest test cases to Swift Testing syntax. The AI assistant understood the context of existing tests and suggested appropriate translations, reducing manual rewrite work significantly. However, the team did not rely blindly on Copilot's suggestions; they implemented strong reliability safeguards, including peer review and automated validation, to ensure correctness. Copilot's ability to accelerate the migration meant that a project that might have taken months was completed in a fraction of the time, allowing the team to focus on edge cases and optimizations rather than repetitive code transformation.</p> <h2 id="q3">What reliability safeguards were put in place during the migration?</h2> <p>To prevent regressions, DoorDash implemented a multi-layered validation process. First, each converted test was run against the existing XCTest version using a parallel test execution environment to ensure identical results. Second, the team used automated scripts to compare coverage metrics, ensuring no test paths were inadvertently removed. Third, any test that produced a mismatch was flagged for manual review by the engineering team. Additionally, the migration was rolled out incrementally—starting with less critical test modules—allowing the team to gain confidence before tackling the entire suite. These safeguards ensured that despite the large scale of changes, the overall quality and reliability of the test suite remained intact, with no unexpected failures in production.</p> <h2 id="q4">What performance gains did DoorDash observe after the migration?</h2> <p>After migrating to Swift Testing, DoorDash reported measurable performance improvements in test execution time. The Swift Testing framework is designed to run tests more efficiently, especially when using structured concurrency features like async/await. This allowed DoorDash to parallelize test execution more effectively, reducing total suite runtime by approximately 30% in initial benchmarks. Additionally, the new code structure simplified debugging and test maintenance, leading to faster developer feedback loops. While exact numbers may vary by project, the team noted that the migration not only modernized their testing approach but also delivered tangible speed benefits that accelerated the overall iOS development lifecycle at DoorDash.</p><figure style="margin:20px 0"><img src="https://imgopt.infoq.com/fit-in/100x100/filters:quality(80)/presentations/game-vr-flat-screens/en/smallimage/thumbnail-1775637585504.jpg" alt="How DoorDash Modernized Its iOS Test Suite with Copilot and Swift Testing" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px">Source: www.infoq.com</figcaption></figure> <h2 id="q5">Who led this migration effort and what was their approach?</h2> <p>The migration was led by DoorDash engineer Matheus Gois, who specialized in iOS testing and infrastructure. Gois adopted a systematic approach: first evaluating the feasibility of using Copilot for automated conversion, then setting up pilot projects to validate the process. He emphasized transparency and collaboration, documenting the migration steps and sharing progress with the wider engineering team. Regular code reviews and feedback loops helped refine the tooling and rules for Swift Testing equivalents. Gois also worked to ensure the migration didn't interrupt ongoing development work by scheduling it during low-traffic periods and providing fallback plans. His leadership ensured the project stayed on schedule while maintaining high quality standards.</p> <h2 id="q6">What are the key benefits of Swift Testing compared to XCTest?</h2> <p>Swift Testing offers several advantages over XCTest, making it an attractive choice for modern iOS development. It is written in Swift, providing a more natural syntax and eliminating the need for Objective-C bridging for test code. Swift Testing also integrates seamlessly with Xcode's testing interface and supports advanced features like async/await for concurrent test execution, which can dramatically reduce runtime for large suites. It introduces property-based testing, allowing developers to define input ranges and let the framework generate test cases automatically. Furthermore, Swift Testing's architecture is designed for better performance and reliability, with built-in retry mechanisms and improved error reporting. These benefits together enable teams to write more expressive, maintainable, and efficient tests, aligning with modern Swift language capabilities.</p> <h2 id="q7">How does this migration reflect broader trends in iOS development?</h2> <p>DoorDash's adoption of Swift Testing mirrors a wider industry shift toward leveraging modern Swift features for improved productivity and performance. As Apple continues to evolve Swift and its tooling, companies are moving away from legacy Objective-C patterns and frameworks like XCTest. The use of AI-assisted tools like Copilot further exemplifies a trend toward automation in software development, where repetitive tasks are handed to intelligent assistants. This migration also highlights a growing emphasis on developer experience—teams are increasingly choosing frameworks that reduce cognitive overhead and speed up feedback loops. DoorDash's success story serves as a case study for how organizations can safely and quickly modernize their codebases by combining cutting-edge tools with careful processes.</p>
Tags: