Application Development For The Hottest Mobile Platform

iPhone Developer

Subscribe to iPhone Developer: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get iPhone Developer: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


iPhone Developer Authors: Shelly Palmer, Mauro Carniel, OnPage Blog, David Balaban, Qamar Qrsh

Related Topics: iPhone Developer

Book Review

Book Review: Test-Driven iOS Development

Developer's Library Series

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
Application Logic
Networking Code
View Controllers
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

More Stories By Tad Anderson

Tad Anderson has been doing Software Architecture for 18 years and Enterprise Architecture for the past few.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.