Unit Testing on iOS: No Voodoo necessary
summary
Argues that iOS unit testing is practical and fast not mystical, demonstrates OCUnit + Kiwi for BDD style tests, shows expectFutureValue / shouldEventually for async assertions with default 1s timeout (configurable to 10s), and uses OHHTTPStubs intercepts requests to return todo_create.json for tasks.json after 1s so networking can be tested deterministically. Recommends in-memory Core Data stores for tests, xcode-test plus Jenkins for CI, runs quick class tests on every build and full suite on CI, and warns against chasing 100% coverage.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 0:31Integration testing
- 1:26Acceptance testing
- 2:31Testing frameworks
- 3:35Unit testing basics
- 4:23Test driven development
- 5:41Benefits of TDD
- 10:05TDD for developer happiness
- 11:27Behavior driven development
- 14:07Testing tools for iOS
- 15:32Mocks and stubs
- 17:27Handling asynchronous tests
- 18:58Network request stubbing
- 21:13Core data testing
- 22:21Testing view controllers
- 23:03CI and command line
- 24:20Test coverage strategy
- 26:22Q&A session
