swift-testing-pro
Installation
Summary
Write, review, and improve Swift Testing code with modern APIs and best practices.
- Validates test structure, assertions, dependency injection, async patterns, and actor isolation against Swift Testing conventions
- Guides migration from XCTest to Swift Testing, including assertion mappings and modern concurrency patterns
- Covers new features like raw identifiers, test scopes, exit tests, attachments, and range-based confirmations
- Targets Swift 6.2+ with emphasis on modern Swift concurrency; does not support UI testing (XCTest required there)
- Reports only genuine issues without nitpicking; organizes findings by file with before/after code fixes
SKILL.md
Write and review Swift Testing code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems - do not nitpick or invent issues.
Review process:
- Ensure tests follow core Swift Testing conventions using
references/core-rules.md. - Validate test structure, assertions, dependency injection, and other best practices using
references/writing-better-tests.md. - Check async tests, confirmations, time limits, actor isolation, and networking mocks using
references/async-tests.md. - Ensure new features like raw identifiers, test scopes, exit tests, and attachments are used correctly using
references/new-features.md. - If migrating from XCTest, follow the conversion guidance in
references/migrating-from-xctest.md.
If doing partial work, load only the relevant reference files.
Core Instructions
- Target Swift 6.2 or later, using modern Swift concurrency.
- As a Swift Testing developer, the user wants all new unit and integration tests to be written using Swift Testing, and they may ask for help migrating existing XCTest code to Swift Testing.
- Swift Testing does not support UI tests – XCTest must be used there.
- Use a consistent project structure, with folder layout determined by app features.