Test-Driven iOS Development Book Review
|This is a great book for both someone who wants to learn Test Driven Development (TDD), anyone that wants to learn how to do unit testing in Xcode, and anyone who wants to improve their designs using TDD.|
The author begins the book with a nice overview of the benefits of testing and how to use TDD to achieve those benefits. He then moves right into how to write unit tests and covers the tools available for unit testing.
He covers OCUnit test (integrated with Xcode) in detail and introduces Google Toolkit for Mac, GHUnit, CATCH, and OCMock. He then introduces continuous integration with coverage of Hudson / Jenkins and CruiseControl.
After introducing the tools, the author spends the next six chapters building an application using TDD. He starts with a specification and ends with a working application. I have listed the chapters below. Their titles explain what they cover and show how the author attacked building the application.
About Software Testing and Unit Testing
Techniques for Test-Driven Development
How to Write a Unit Test
Tools for Testing
Test-Driven Development of an iOS App
The Data Model
Putting It All Together
Designing for Test-Driven Development
Applying Test-Driven Development to an Existing Project
Beyond Today’s Test-Driven Development
The cool thing about the chapters that cover the building of the applications is that the author hits on a ton of subjects in all the different layers of a typical application. The book hits on NSURLConnection, JSON, UITableVieController, view controllers, NSData, and a ton of the STAssert* macros.
The book ends with three chapters chalked full of advice on how to design using TDD principles, how to apply tests to an existing projects and how refactoring plays a big role applying them, and the last chapter takes a look at the future of test driven development in the Cocoa Touch world.
The code is downloadable as a completed project. It is very well organized and usable. It runs with no modifications needed.
All in all I found this book to be an enjoyable read. The author's writing style kept my attention and he was very clear when explaining things. He also offered a lot of advice via relevant sidebars throughout the book.
If you are an iOS developer, or just a developer interested in TDD, this book is a must read!!!
Test-Driven iOS Development
For more book recommendations check out my .NET, iOS, and Java Architecture and Development Book Recommendations for 2013