How DoorDash Modernized Its iOS Testing with Copilot and Swift Testing

By • min read
<p>DoorDash, a leading food delivery platform, recently undertook a major modernization of its iOS testing infrastructure. By leveraging GitHub Copilot alongside robust reliability safeguards, the engineering team migrated their entire XCTest-based test suite to Swift Testing. This shift not only streamlined the codebase but also delivered measurable performance improvements. Below, we explore the key questions behind this transformation.</p> <ul> <li><a href="#q1">What prompted DoorDash to move from XCTest to Swift Testing?</a></li> <li><a href="#q2">How did GitHub Copilot assist in the migration process?</a></li> <li><a href="#q3">What reliability safeguards were implemented during the transition?</a></li> <li><a href="#q4">What performance gains did DoorDash achieve after switching to Swift Testing?</a></li> <li><a href="#q5">How did the team ensure the migration was completed safely and quickly?</a></li> <li><a href="#q6">What was the overall impact on DoorDash’s iOS development workflow?</a></li> </ul> <h2 id="q1">What prompted DoorDash to move from XCTest to Swift Testing?</h2> <p>DoorDash had been using XCTest for years, but as their iOS app grew in complexity, the test suite became increasingly unwieldy. XCTest, while reliable, lacked some modern features that could improve developer productivity and test performance. Swift Testing, introduced more recently, offered a more concise syntax, better integration with Swift’s concurrency model, and improved performance characteristics. The engineering team recognized that migrating to Swift Testing could reduce boilerplate code, make tests easier to read and maintain, and speed up test execution. However, the existing test suite was large and critical to the app’s quality. Any migration had to be done with minimal disruption, which is why DoorDash turned to automated tooling like Copilot to accelerate the process while maintaining high reliability standards.</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 Testing 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 assist in the migration process?</h2> <p>GitHub Copilot acted as an intelligent coding assistant during the migration. Instead of manually rewriting each XCTest assertion and test structure, developers could prompt Copilot to convert existing XCTest code into Swift Testing equivalents. For example, Copilot could transform <code>XCTAssertEqual(a, b)</code> into the more succinct Swift Testing assertion <code>#expect(a == b)</code>. It also helped with more complex tasks like adapting async test patterns and restructuring test classes. According to Matheus Gois, the lead engineer on the project, Copilot significantly reduced the time needed to rewrite thousands of test cases. However, the team didn’t rely on it blindly; they combined Copilot’s suggestions with human review and a set of automated safety checks to ensure correctness. This hybrid approach allowed DoorDash to modernize a large test suite quickly without sacrificing quality.</p> <h2 id="q3">What reliability safeguards were implemented during the transition?</h2> <p>To prevent regressions during the migration, DoorDash introduced several layers of safeguards. First, they ran the original XCTest suite alongside the new Swift Testing suite for a period, comparing results to catch any discrepancies. Any test that failed in one framework but passed in the other was flagged for manual inspection. Second, they used continuous integration (CI) pipelines that required both test suites to pass before any migration step was considered complete. Third, they enforced incremental migration: instead of converting all tests at once, they migrated one module or feature area at a time, validating each chunk before moving on. Finally, they implemented a dashboard that tracked migration progress and failure rates, giving the team real-time visibility. These measures ensured that the Copilot-assisted rewrite didn’t introduce bugs or reduce test coverage, maintaining DoorDash’s high quality standards throughout the process.</p> <h2 id="q4">What performance gains did DoorDash achieve after switching to Swift Testing?</h2> <p>After completing the migration, DoorDash observed measurable performance improvements in their test suite. The most notable gain was a reduction in overall test execution time—Swift Testing’s more efficient runtime and better concurrency support allowed tests to run faster, especially those involving async operations. In some cases, individual test execution times dropped by 20–30%. Additionally, the new Swift Testing syntax is more succinct, which reduced the volume of test code by roughly 15–20%. This made the test suite easier to maintain and reduced the cognitive load on developers. Faster tests also meant quicker feedback in CI pipelines, enabling developers to iterate more rapidly. According to Matheus Gois, these gains translated directly into improved developer productivity and faster time-to-market for new features.</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 Testing 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">How did the team ensure the migration was completed safely and quickly?</h2> <p>The key to balancing speed and safety was a phased, automated approach. DoorDash started by using Copilot to generate candidate Swift Testing code from existing XCTest cases. Then, a custom script would compile and run the new tests, comparing results against the original. Any discrepancies automatically triggered a human review. This cycle was repeated for each test file or module, with the team gradually expanding coverage. They also prioritized high-impact test files first—those that were executed most frequently or covered critical functionality. To avoid overwhelming the developers, they set a daily limit on the number of tests migrated per person. Automated linting and formatting tools ensured the new code adhered to DoorDash’s coding standards. By combining Copilot’s speed with robust validation, the team completed the migration of over 10,000 test cases in just a few months without any significant outages or quality degradation.</p> <h2 id="q6">What was the overall impact on DoorDash’s iOS development workflow?</h2> <p>The migration to Swift Testing had a lasting positive impact on DoorDash’s iOS engineering. Developers now have a more modern test framework that integrates seamlessly with Swift’s language features, making tests more expressive and easier to write. The execution speed improvements have shortened the feedback loop, allowing developers to run tests more frequently during development. The reduction in boilerplate code also makes test codebases cleaner and more maintainable. Beyond technical benefits, the project demonstrated that large-scale migrations can be done efficiently with the right combination of AI assistance and human oversight. This success has encouraged DoorDash to explore similar modernization efforts in other parts of their infrastructure. Ultimately, the project not only updated a legacy test suite but also fostered a culture of continuous improvement and adoption of cutting-edge tools.</p>