O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test-Driven Development

Now that we have a good handle on how to create a unit test, we are going to delve into the realm of test-driven development (TDD). TDD, in a nutshell, is figuring out the least number of objects you need to create in order to get your application to work the way you want it to. TDD utilizes the idea that you will write your tests first rather than after you have already completed your application.

If we write tests for the app now, we’ll just be checking functionality we already know works. In TDD, we write the test first, fail for lack of any working functionality, then press ahead and actually create the functionality.

Why do we want to do all this extra work before we write a line of code? Let’s jump in the Way ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required