swift-testing
swift testing
What it does
- @Test Traits
- #expect and #require
- @Suite and Test Organization
- Execution Model
- XCTest Migration Boundaries
- Known Issues
- Additional Patterns
Requirements & configuration
- #expect and #require
- expect and #require
- // #require records failure AND stops test (like XCTUnwrap)
- let user = try #require(await fetchUser(id: 1))
- // #require for optionals -- unwraps or fails
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
swift-testing FAQ
What does the swift-testing skill do?
Writes and migrates Swift Testing framework tests with @Test, @Suite, #expect, #require, confirmation, traits, withKnownIssue, Attachment.record, processExitsWith exit tests and capture lists, Test.cancel, Issue.record warnings/manual failures, XCTest-to-Swift Testing migration, Xcode 27 interoperability modes, XCUITest UI-test boundaries, performance/snapshot boundaries, mocking, async patterns, and test organization. Use when writing tests, converting XCTest assertions such as XCTUnwrap or XCTFail, reviewing advanced Swift Testing API availability, or deciding when to keep XCTest/XCUITest. @Test Traits #expect and #require
What does swift-testing require?
#expect and #require expect and #require // #require records failure AND stops test (like XCTUnwrap) let user = try #require(await fetchUser(id: 1)) // #require for optionals -- unwraps or fails
How do I install swift-testing?
Run: npx -y skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-testing --agent claude-code — the source lives at github.com/dpearson2699/swift-ios-skills.
Maintain swift-testing?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[swift-testing on getagentictools](https://getagentictools.com/skills/dpearson2699-swift-ios-skills-swift-testing?ref=badge) npx agentictools info skills/dpearson2699-swift-ios-skills-swift-testing The second line is the CLI lookup for this page — handy in READMEs and docs.