Xcode is the complete toolset developed by Apple for building Mac apps and iOS apps. In these two part article, Charlie Fulton proposes a tutorial to start performing unit tests for apps developed with Xcode in a continuous integration context.
The two posts are based on an example Xcode project. They show you how to add some unit tests to your project, add a remote GitHub repository and then setup a continuous integration (CI) server with Jenkins. Jenkins will periodically check your GitHub repository for changes and automatically build, test, and submit your app to TestFlight, a free testing service for mobile developers.
The first part explain how to install and configure all the software tools needed for this tutorial. Then it provides some introduction to unit testing and how to run them. The second part focuses on the unit testing creation and execution. It also discusses how to use TestFlight.
Read the two parts of this tutorial on http://www.raywenderlich.com/22590/beginning-automated-testing-with-xcode-part-12 and http://www.raywenderlich.com/22816/beginning-automated-testing-with-xcode-part-22