iOS Testing: Beyond the Model
summary
An image‑processing app called Show and Hide that detects a dominant color and produces two partially colored images, with unit tests that split ViewController logic into a presenter seam, verify button selectors and navigation pushes (partial mocks of navigationController), handle asynchronous work with XCTest expectations, compare UIImages by breaking them into RGBA arrays, use OCMock and KIF for complementary UI tests, contain ~300 lines of processing code with 22 tests (~400 lines of test code plus separate performance targets) and speed improving from 5–10s to interactive.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:55Controversial assumptions
- 3:47Unit tests
- 5:54What not to do
- 6:53Mocking
- 9:16UI Automation
- 11:49View controllers
- 14:20Testing buttons
- 17:59Mock navigation controller
- 20:22Asynchronous code
- 22:52Last screen
- 23:48Image processing
- 27:52Unit testing vs UI automation








