O'Reilly logo

Sams Teach Yourself Xcode® 4 in 24 Hours by William Ray, John Ray

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

Hour 18. Test Early, Test Often

What You’ll Learn in This Hour:

The wrong way (adding unit tests to an existing application)

The right way (test-driven development and testing before code)

How to use the available OCUnit testing macros to validate your application logic

How to give the OCUnit framework a handle into your running app to test live application features

All the examples so far have focused on the aspects of Xcode necessary to complete the steps, and this has led to us displaying some fairly shoddy practices in terms of code development, testing, and debugging. Code littered with NSLog() calls, although convenient to use as an example (of something other than good code), is difficult to maintain and is quite unlikely to ...

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