- 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: 6.9 x 0.6 x 8.9 inches
- Shipping Weight: 13.6 ounces (View shipping rates and policies)
- Average Customer Review: 24 customer reviews
- Amazon Best Sellers Rank: #1,387,467 in Books (See Top 100 in Books)
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.
To get the free app, enter your mobile phone number.
Test-Driven iOS Development (Developer's Library) 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
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.
Top customer reviews
Having recently moved from years of .Net development to iOS development, I was looking for both a quick indoctrination (by example) on how to configure and use the OCUnit test environment shipped with Xcode as well as wanting to see how a subject matter expert dealt with the early "expense" of writing unit tests while the design of the application continued to evolve. The book met both of these objectives for me, it was quite evident that the author truly employed the development processes on the project he proffered, by demonstrating on multiple occasions that some implementation paths dead-ended requiring refactoring of both test and code. Several other books on TDD seem to always get it right the first time and gloss over the investment of carrying unit tests throughout the entire development lifecycle. So a big thank you for a realistic work flow to drive the principles in the example.
For full disclosure, I have less than 3 weeks of iOS programming experience, but I am currently completely immersed in the platform while taking the iTunes University Stanford CS193p course. I was looking to augment the coursework with unit testing and this book quickly bridged the gap between Microsoft's Test framework and OCUnit tests. I can recommend this as a quick bridge if you have experience in the .Net world. I decided to build the project as I worked through the book which took me about 7 days. I had very little problem keeping in synch with the author, through Chapter 8, writing the same tests and validating pass/fail expectations that were set in the book along the way. This covered the application data model, application logic, and networking. The application is an iPhone app which browses the popular [...] My basic controller skills were not up to par with the author's resourceful/skilled implementation usage of a single view controller so I parted ways and implemented a three controller solution, but stayed true to the TDD way with unit tests that matched my pedestrian solution.
Once the controllers were in place the remaining couple of chapters again synched up well with my work and I was able to complete the project with same finishing touches to the views that the author made.
I was very glad to have the git repository of the code at my disposal, I would not have been successful without the code to reference. In fact, the availability of the code accounts for at least one of the rating stars!
So why not five stars? Granted its a first edition work, and though the typos/errors in the book are few, there is no website or online tool for checking or submitting errata.
- Chapter 5 starts with a sidebar on the need (or no need) to get an API key from StackOverflow, to guard against being throttled by StackOverflow for making too many requests. A few more words on what the limit is would have allayed my fear of a low limit cut-off and saved me from needlessly running into the StackOverflow oAuth/API key ditch.
- Chapter 9 is tough and needs a Black Diamond warning or novices beware warning, the technical complexity just seemed to jump a quantum from the rest of the book.
All in all, I recommend buying the book and doing the work. I'd love to have coffee with the author someday and personally express my thanks for the experience!
Also: Not that it matters for the content, but the front picture is all pixelated/grainy, as if it was stretched out to fit on the odd sized book. I think the content is fine, I just feel like I didn't pay the right person for the book.
Update - Book printing is terrible but the content is quite good.
Reading this book not only taught me and encourage me to write unit tests for the apps I develop, but also made me learn a lot about code best practices and design patterns. I am a better programmer after reading it.
I would recommend this book to any (intermediate or advanced) iOS developer who is devoted to writting better quality software.
After applying tricks I learn from this well crafted book, I could refactor and fix my app quickly. In short it tells way beyond TDD, it's an iOS coding style. A style which fits me well.
I recommend this for anyone who wants to build an app seriously.
Most recent customer reviews
I think that Graham Lee was extremely lazy in this book.Read more
At times I found it hard to follow since the pace gets really fast towards the end of...Read more