
Swift Testing
Swift Testing framework guide covering @Test, #expect, #require, traits, known issues, and XCTest migration boundaries.
- skills.sh installs
- 4.6K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
What it does
- Covers writing unit tests with
@Test,@Suite,#expect,#require, traits, andwithKnownIssue, plus XCTest-to-Swift Testing migration - Includes parallel execution rules,
.serializedsuite guidance, attachments, exit testing, and Xcode 27 interoperability modes - Enforces that tests set up their own state, and keeps UI, performance, and common snapshot tests on XCTest or XCUITest
- Designed for Swift 6 projects writing new unit tests or migrating existing XCTest suites file by file
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill swift-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Swift Testing
Swift Testing is the modern testing framework for Swift (Xcode 16+, Swift 6+). Prefer it for new unit tests. Keep XCTest where migration is still in progress, and use XCTest for UI automation, performance APIs, Objective-C exception tests, and common snapshot-test tooling.
Contents
- Basic Tests
@Test Traits- #expect and #require
@Suite and Test Organization- Execution Model
- XCTest Migration Boundaries
- Known Issues
- Additional Patterns
- Common Mistakes
- Test Attachments
- Exit Testing
- Version-Gated APIs
- Review Checklist
- References
Basic Tests
import Testing
@Test("User can update their display name")
func updateDisplayName() {
var user = User(name: "Alice")
user.name = "Bob"
#expect(user.name == "Bob")
}
@Test Traits
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Testing & QA, Mobile Apps
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 94- Ios Localization4.6K
- Swift Concurrency4.6K
- Swiftui Layout Components4.5K
- Push Notifications4.5K
- Swiftui Liquid Glass4.4K
- Swiftdata4.4K
- Debugging Instruments4.3K
- Swiftui Uikit Interop4.3K
- Widgetkit4.3K
- Storekit4.3K
- Swiftui Gestures4.3K
- Apple On Device Ai4.3K
- Swift Charts4.2K
- App Intents4.2K
- Swift Language4.2K
- Authentication4.1K
- Background Processing4.1K
- Healthkit4.1K
- Vision Framework4.1K
- Coreml4K
- Core Bluetooth4K
- Core Motion3.9K
- Natural Language3.9K
- Speech Recognition3.9K
Similar to Swift Testing
More Testing & QA
axiom-swift-testingSkillcharleswiltgen/axiom208 installsSwift Testing guidance for writing, migrating, and speeding up unit tests without a simulator.
axiom-testingSkillcharleswiltgen/axiom1.4K installsComprehensive testing router for Swift Testing, XCTest, async tests, and UI automation with failure triage.
ios-testingSkillpproenca/dot-skills288 installsComprehensive iOS testing guide for Swift 6.2 clinic MVVM-C apps, covering 44 rules across eight categories.
swift-core-skillsPlugindpearson2699/swift-ios-skills1.3K starsCore Swift language features, concurrency, API design guidelines, testing, SwiftData, Core Data, Charts, Codable, FormatStyle, and architecture patterns
swift-concurrencySkilldpearson2699/swift-ios-skills4.6K installsSwift concurrency guidance for fixing compiler errors, adopting Swift 6.2 approachable concurrency, and writing data-race-safe async code.
write-swiftSkillemilkowalski/skills166.8K installsSwift 6-era guide for modeling, concurrency, and performance, covering value types, actors, and ARC.