Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.

Test-Driven iOS Development (Developer's Library) 1st Edition

4.2 out of 5 stars 23 customer reviews
ISBN-13: 978-0321774187
ISBN-10: 0321774183
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used On clicking this link, a new layer will be open
$8.16 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$30.50 On clicking this link, a new layer will be open
More Buying Choices
19 New from $25.03 27 Used from $3.88
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

$30.50 FREE Shipping. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

  • Test-Driven iOS Development (Developer's Library)
  • +
  • Test iOS Apps with UI Automation: Bug Hunting Made Easy
  • +
  • Test Driven Development: By Example
Total price: $92.80
Buy the selected items together

Editorial Reviews

From the Back Cover

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 Development is 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 includes

  • Understanding the purpose, benefits, and costs of unit testing in iOS environments
  • Mastering the principles of TDD, and applying them in areas from app design to refactoring
  • Writing usable, readable, and repeatable iOS unit tests
  • Using OCUnit to set up your Xcode project for TDD
  • Using domain analysis to identify the classes and interactions your app needs, and designing it accordingly
  • Considering third-party tools for iOS unit testing
  • Building networking code in a test-driven manner
  • Automating testing of view controller code that interacts with users
  • Designing to interfaces, not implementations
  • Testing concurrent code that typically runs in the background
  • Applying TDD to existing apps
  • Preparing for Behavior Driven Development (BDD)

 

The only iOS-specific guide to TDD and unit testing, Test-Driven iOS Development covers both essential
concepts and practical implementation.

 


 

About the Author

Graham Lee's job title is “Smartphone Security Boffin,” a role that requires a good deal of confidence in the code he produces. His first exposure to OCUnit and unit testing came around six years ago, as test lead on a GNUstep-based server application. Before iOS became the main focus of his work, Graham worked on applications for Mac OS X, NeXTSTEP, and any number of UNIX variants.

 

This book is the second Graham has written as part of his scheme to learn loads about computing by trying to find ways to explain it to other people. Other parts of this dastardly plan include speaking frequently at conferences across the world, attending developer meetings near to his home town of Oxford, and volunteering at the Swindon Museum of Computing.

 

NO_CONTENT_IN_FEATURE


Product Details

  • Series: Developer's Library
  • Paperback: 256 pages
  • Publisher: Addison-Wesley Professional; 1 edition (April 19, 2012)
  • Language: English
  • ISBN-10: 0321774183
  • ISBN-13: 978-0321774187
  • Product Dimensions: 7 x 0.6 x 8.9 inches
  • Shipping Weight: 13.6 ounces (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (23 customer reviews)
  • Amazon Best Sellers Rank: #805,739 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

Format: Paperback
The book is a decent introduction into TDD for iOS but it only gets two stars because the author was extremely lazy with the examples. I'm pretty experienced with iOS coding and found huge gaps in the examples that required looking through the example project to figure out. Gaps are fine if they have a teaching purpose but most of the ones I found dealt with just not explaining how his example app was supposed to work- not with learning anything particularly related to TDD.

The author also never covers any strategies for developing test cases. For someone new to TDD, the reason he chooses to test certain things is a complete mystery. Often it's "I want to do X here are some random test cases I think that are related to that." There's so little explanation as to why he thinks those are good tests e.g. it's good to have coverage on how data is handed off between classes or it's good to test for malformed data sent into method parameters.

I mostly found this book very frustrating to read because I had to constantly re-read his explanations, review his example code, and draw my own conclusions by reading between the lines as to why he chose to test things in the way he did.

If you are moderately experienced with iOS coding and don't mind analyzing this guy's code to figure out TDD best practices, then this book is for you. He does execute his stuff really well and you can learn a lot from the way he approaches things but if you want to start doing TDD on your own, strap yourself in for some serious code analysis because the author offers few strategic explanations.
3 Comments 15 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
I'd actually talked with Graham briefly after his TDD presentation at the Seattle VTM conference last year, where he'd just about convinced me that TDD might be something other than the development-slowing waste of time I'd previously observed it to be at places that applied it as a management-imposed afterthought, so I had fairly high expectations of the book; and why yes, yes indeed it would be an excellent book even if it wasn't the one and only out there for iOS on the subject -- matter of fact, unconditionally recommended to anyone who wants to be a better iOS programmer!

If you've already got the TDD religion from other platforms, you can jump directly to Chapter 4 "Tools For Testing"; those of us of a more skeptical bent will find reading through Chapters 1-3 an nice gentle progression through demonstrating the value of testing at all through to "How to Write a Unit Test" and how that leads to safely refactorable design.

Said Chapter 4 goes over the Xcode built-in support thoroughly and introduces GTM, GHUnit, CATCH, and OCMock on the coding side, plus Hudson/Jenkins and CruiseControl on the integration side. That covers anything you're even remotely likely to encounter in existing projects.

Chapter 5 "Test-Driven Development of an iOS App" starts the 6 chapter process of developing BrowseOverflow, a StackOverflow question browser; full source available on github for everyone.
Read more ›
Comment 13 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
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.
Read more ›
Comment 6 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews

Set up an Amazon Giveaway

Test-Driven iOS Development (Developer's Library)
Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
This item: Test-Driven iOS Development (Developer's Library)

Pages with Related Products. See and discover other items: app development