ios-testinglisted
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