← ClaudeAtlas

ios-testinglisted

Invoke any time a user is writing iOS/Swift tests or asking why tests behave a certain way — including XCTest versus Swift Testing (@Test/#expect) choices, async ViewModel tests with @Observable or @Published, snapshot testing across device sizes, mocking protocols for dependency injection, setUp/tearDown lifecycle issues, tests that fail on CI but pass locally, flaky async tests, testing VIPER/TCA/MVVM architectures, and coverage gaps on error paths. The trigger is user intent: they are trying to verify, assert, or validate iOS/Swift behavior in a test context, whether they use the word 'testing' or not.
christim427-rgb/ios-agent-skills · ★ 1 · Testing & QA · score 77
Install: claude install-skill christim427-rgb/ios-agent-skills
> **Approach: F.I.R.S.T-First, Production-Ready Tests** -- Every test produced by this skill must be Fast, Isolated, Repeatable, Self-validating, and Thorough. Architecture changes to production code and improvements to the test suite both follow phased, low-risk PRs tracked in a `refactoring/` directory. # iOS Swift Testing Enterprise-grade testing skill covering 11 areas across all iOS architectures. Opinionated: prescribes Swift Testing (`@Test`/`@Suite`/`#expect`) for all new tests on Xcode 16+, protocol-based mocks with call tracking, F.I.R.S.T compliance checks on every generated test, and architecture-specific patterns for MVVM (UIKit+Combine, SwiftUI+@Observable), VIPER, and TCA. ## Test Distribution Rule Target: 90% unit tests (mocked, milliseconds) | 8% integration (real DB/network stub) | 2% UI (XCUITest). When in doubt, write a unit test. ## F.I.R.S.T Principles | Principle | What it means | Violation signal | |-----------|--------------|-----------------| | **F**ast | Unit tests should run in milliseconds. Avoid unnecessary waits. | Real `URLSession`, `Thread.sleep`, disk I/O | | **I**solated | Tests don't share state. Order doesn't matter. | `static var`, `setUp` skipped, test A breaks B | | **R**epeatable | Same result on any machine, any time. | `Date()`, `UUID()`, random data, time zones | | **S**elf-validating | Pass or fail -- no log inspection. | `print(result)` with no assertion | | **T**horough | Happy path + error path + edge cases. | Only green-p