swift-testing

Installation
Summary

Modern Swift testing framework with @Test macros, parameterized tests, traits, and async support.

  • Write unit tests using @Test macros with #expect and #require assertions; prefer Swift Testing over XCTest for all new tests (Xcode 16+, Swift 6+)
  • Organize tests with @Suite for grouping, custom tags for filtering, and traits for conditional execution, time limits, and known issues
  • Support parameterized tests via arguments: with enum cases, ranges, or cartesian products; use confirmation() to verify async callbacks without sleep
  • Handle async/await patterns natively, test error paths with throws: expectations, and manage actor-isolated state with await
SKILL.md

Swift Testing

Swift Testing is the modern testing framework for Swift (Xcode 16+, Swift 6+). Prefer it over XCTest for all new unit tests. Use XCTest only for UI tests, performance benchmarks, and snapshot tests.

Contents

Related skills

More from dpearson2699/swift-ios-skills

Installs
1.5K
GitHub Stars
562
First Seen
Mar 3, 2026