Testability is architectural feedback. If a business rule requires a simulator, network, database, and navigation stack before it can be verified, responsibilities are probably too tightly connected. Good boundaries let fast tests exercise policy directly while a smaller number of integration and UI tests verify that real pieces connect and users can complete important workflows.
A fake is a lightweight working implementation, such as an in-memory repository. A stub returns controlled values, while a spy records interactions for later verification. Prefer state or returned-result assertions over verifying every internal method call. A mock with rigid interaction expectations can make harmless refactoring expensive when the interaction itself is not the behavior under test.
Swift Testing provides @Test, #expect, #require, parameterized tests, traits, and native concurrency support for unit and integration tests. XCTest remains important for UI automation and established suites. Inject clocks, identifiers, repositories, and failure behavior so tests are deterministic, isolated, and safe to run in parallel.