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 - Basic Tests - - #expect and #require - - Execution Model - XCTest Migration Boundaries - Known Issues - Additional Patterns - Common Mistakes - Test Attachments - Exit Testing - Version-Gated APIs - Advanced API Review Checklist - Review Checklist - References --- Basic Tests Traits #expect and #require Rule: Use when subsequent assertions depend on the value. Use for inde…