Swift Testing Expert

Use this skill to write, review, design or migrate Swift tests, and for TDD workflow (red-green-refactor, triangulation, outside-in vs inside-out, legacy code, bug fixes). Covers Swift Testing syntax (@Test, @Suite, #expect, #require, confirmation, parameterized tests, traits), migrating an XCTest suite incrementally (API translations, interop modes, replacing addTeardownBlock and XCTestExpectation), test doubles (dummy, stub, spy, fake, mock), test design (naming, makeSUT, DSLs, snapshots, localization), making ASYNC tests deterministic without sleeps, and choosing a testing level (unit, integration, snapshot, acceptance, UI). Trigger even when "test" isn't said -- "my tests are flaky", "how do I fake the network", "this async test hangs", "should I mock this", "should I write the test first". Do NOT use for app architecture (ios-architecture-expert), BDD specs or acceptance criteria (requirements-engineering), general Swift language features (swift-language-expert), or SwiftUI view code (swiftui-expert).

SwiftyJourney f130ced 8 files · 98.2 KB Updated

File contents

swiftyjourney/swift-testing-expert-skill/tree/main/skills/swift-testing-expert commit f130ced879

Frequently asked questions

npx skillmds@latest add swiftyjourney/swift-testing-expert