
Swift Testing
Covers the modern Swift Testing framework that ships with Xcode 16 and Swift 6. You'll reach for this when migrating from XCTest or writing new unit tests with @Test macros, #expect assertions, and parameterized tests. The skill is opinionated about execution model details that trip people up, like parallel test execution by default and when to actually use .serialized. It includes practical patterns for async testing with confirmation counts, withKnownIssue for flaky tests, and a solid common mistakes section that calls out things like using sleep instead of confirmation. The review checklist alone makes it worth having around when you're setting up a new test suite.
- skills.sh installs
- 4.5K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill swift-testing --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Frontend Development, Backend & APIs, Testing & QA, Git & Pull Requests, Documentation, Debugging, Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Ios Localization4.5K
- Swift Concurrency4.5K
- Swiftui Layout Components4.4K
- Push Notifications4.4K
- Swiftui Liquid Glass4.3K
- Swiftdata4.3K
- Debugging Instruments4.3K
- Swiftui Uikit Interop4.2K
- Storekit4.2K
- Widgetkit4.2K
- Swiftui Gestures4.2K
- Apple On Device Ai4.2K
- Swift Charts4.2K
- Swift Language4.1K
- App Intents4.1K
- Authentication4.1K
- Background Processing4.1K
- Healthkit4K
- Vision Framework4K
- Coreml3.9K
- Core Bluetooth3.9K
- Core Motion3.8K
- Natural Language3.8K
- Speech Recognition3.8K