iOS Development Guide Back to iOS Resources
Unit tests help you write robust and secure code. Xcode provides an easy-to-use flexible unit-testing environment that you can use to ensure your code works as designed as it goes through changes.This chapter introduces unit testing and describes how you can take advantage of it in your projects.
How to install UISpec.
The documentation on UISpec.
As we get in to developing iPhone/Touch applications at Carbon Five, we obviously want to bring over all our best agile practices including test driven development (TDD).I’ve been bootstrapping with the beta version of the Pragmatic iPhone SDK Development book but was disappointed to find no discussion of unit testing for the iPhone. So I’ve been piecing it together as I go.
Cucumber is Aslak Hellesøy’s rewrite of RSpec’s “Story runner”, which was originally written by Dan North. (Which again was a rewrite of his first implementation – “RBehave”). Early versions of “Story runner” required that stories be written in Ruby. Shortly after, David Chelimsky added plain textsupport with contributions from half a dozen other people.
Cucumber is an innovative testing framework that takes BDD one step further. It provides a simple way to allow the ones who are responsible for writing the requirements to write them in a language called Gherkin, which is plain English with a few formatting rules. The developer, in turn, writes code that interprets these requirements and converts them into real tests.