Test-Driven iOS Development (Developer's Library)
As iOS apps become increasingly complex and business-critical, iOS developers must ensure consistently superior code quality. This means adopting best practices for creating and testing iOS apps. Test-Driven Development (TDD) is one of the most powerful of these best practices.Test-Driven iOS Developmentis the first book 100% focused on helping you successfully implement TDD and unit testing in an iOS environment. Long-time iOS/Mac developer Graham Lee helps you rapidly integrate TDD into your existing processes using Apple’s Xcode 4 and the OCUnit unit testing framework. He guides you through constructing an entire Objective-C iOS app in a test-driven manner, from initial specification to functional product. Lee also introduces powerful patterns for applying TDD in iOS development, and previews powerful automated testing capabilities that will soon arrive on the iOS platform. Coverage includesUnderstanding the purpose, benefits, and costs of unit testing in iOS environmentsMastering the principles of TDD, and applying them in areas from app design to refactoringWriting usable, readable, and repeatable iOS unit testsUsing OCUnit to set up your Xcode project for TDDUsing domain analysis to identify the classes and interactions your app needs, and designing it accordinglyConsidering third-party tools for iOS unit testingBuilding networking code in a test-driven mannerAutomating testing of view controller code that interacts with usersDesigning to interfaces, not implementationsTesting concurrent code that typically runs in the backgroundApplying TDD to existing appsPreparing for Behavior Driven Development (BDD) The only iOS-specific guide to TDD and unit testing,Test-Driven iOS Developmentcovers both essentialconceptsandpractical implementation.