# Swift Testing

Published articles for Swift Testing.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Moving from XCTest to Swift Testing \[FREE\]

DevFeed: [Moving from XCTest to Swift Testing \[FREE\]](<https://devfeed.tech/articles/moving-from-xctest-to-swift-testing-free-11509.md>)

Original publisher: [Read original article](<https://www.kodeco.com/53560697-moving-from-xctest-to-swift-testing>)

Author: renan.dias

Published: 2026-09-11T18:41:42Z

Content type: tutorial

Language: en

Sources: [Kodeco | High quality programming tutorials: iOS, Android, Swift, Kotlin, Unity, and more](<https://devfeed.tech/sources/kodeco-high-quality-programming-tutorials-ios-android-swift-kotlin-unity-and-more.md>)

Topics: [Swift Testing](<https://devfeed.tech/topics/swift-testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [agentic-coding](<https://devfeed.tech/topics/agentic-coding.md>), [SwiftUI](<https://devfeed.tech/topics/swiftui.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [agentic](<https://devfeed.tech/tags/agentic.md>), [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [app](<https://devfeed.tech/tags/app.md>), [apple](<https://devfeed.tech/tags/apple.md>), [article](<https://devfeed.tech/tags/article.md>), [free](<https://devfeed.tech/tags/free.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [swift-testing](<https://devfeed.tech/tags/swift-testing.md>), [swiftui](<https://devfeed.tech/tags/swiftui.md>), [testing](<https://devfeed.tech/tags/testing.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

A tutorial on migrating unit tests from Apple's XCTest framework to Swift Testing. It explains common testing scenarios, Swift Testing's newer syntax and constructs, and how Xcode's Agentic Coding can assist with the migration while working on a SwiftUI coffee-ordering app.

### Source excerpt

Swift Testing is Apple's replacement for the objective-C XCTest unit testing framework. Discover how to migrate your existing XCTest suites over to Swift Testing, including how to get some assistance from Xcode's agentic AI tooling.

## Swift Testing explained with code examples

DevFeed: [Swift Testing explained with code examples](<https://devfeed.tech/articles/swift-testing-explained-with-code-examples-11484.md>)

Original publisher: [Read original article](<https://www.avanderlee.com/swift-testing/modern-unit-test/>)

Author: Antoine van der Lee

Published: 2026-08-17T08:51:15Z

Content type: tutorial

Language: en

Sources: [SwiftLee](<https://devfeed.tech/sources/swiftlee.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [examples](<https://devfeed.tech/tags/examples.md>), [net-conf](<https://devfeed.tech/tags/net-conf.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-testing](<https://devfeed.tech/tags/swift-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

This tutorial introduces Swift Testing, the modern Swift testing framework built around expressive macros such as @Test, #expect, and #require. It explains how Swift Testing replaces XCTest, reduces repetitive boilerplate, defines tests globally, and organizes them with structs, traits, and tags.

### Source excerpt

Swift Testing is the modern framework for writing tests in Swift, built around expressive macros like @Test, #expect, and #require. It's the successor to XCTest and the default testing framework for new projects in Xcode. Instead of dozens of assertion methods, you work with a single expressive macro that tells you exactly why a test ... -> The post Swift Testing explained with code examples appeared first on SwiftLee.

## Replay: Record and Replay HTTP Traffic for Swift Tests

DevFeed: [Replay: Record and Replay HTTP Traffic for Swift Tests](<https://devfeed.tech/articles/replay-29003.md>)

Original publisher: [Read original article](<https://nshipster.com/replay/>)

Author: Mattt (mattt@nshipster.com)

Published: 2025-12-31T08:00:00Z

Content type: article

Language: en

Sources: [NSHipster](<https://devfeed.tech/sources/nshipster.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Swift Testing](<https://devfeed.tech/topics/swift-testing.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [http](<https://devfeed.tech/tags/http.md>), [miscellaneous](<https://devfeed.tech/tags/miscellaneous.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-testing](<https://devfeed.tech/tags/swift-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

Replay is a Swift testing approach that records real HTTP traffic as HAR files and replays it during subsequent test runs. It aims to avoid live-service flakiness, hand-maintained fixtures, and duplicate networking implementations while using Swift Testing and package plugins.

### Source excerpt

Fast, reliable API tests without mocks or stale JSON fixtures. Replay records real HTTP traffic once (as HAR) and replays it instantly with Swift Testing so your networking code stays honest and your test suite stays fast.