iOS: Setting Up a Test Environment is a Mess

Really. I have tried. I have done it successfully but it was a bit of work.

There are a number of complications to set up a decent testing environment for iOS. I will describe which tools I choose and what I had to do to get everything running. I will not describe everything in detail but hopefully it will still give you a starting point.

All in all, I think that this should be (a lot) easier, even in this part of the C universe.

So what do I consider a decent testing environment?

I think at first we need support for unit tests and acceptance tests (in the agile meaning). Unit tests to get the low level stuff right (we can also use it for some integration testing) and acceptance tests to do some end-to-end testing.

Running all the tests manually is not a good idea anymore so I will run them on a continuous integration server, which will also take care of collecting code coverage.

My current collection of tools include XCode (xcodebuild, gcc, gcov) with iOS SDK, Google Toolbox for MacOCMock, OCHamcrest, Cucumber, Frank (includes UISpec) and Jenkins/Hudson (with gcovr for xml-ifying gcov).

All tools are free and all I had to do was to make them play together. A number of blogs provided helpful information. I will try to list them for reference.

There is a lot of stuff and to make it an easier read I split in into multiple articles. Here is the complete list:

February 2011: Here is new article regarding setup of OCMock & OCHamcrest:

Ok, let’s start with iOS: Setting Up Basic Unit Testing.

Advertisements

7 thoughts on “iOS: Setting Up a Test Environment is a Mess

  1. Ups and Downs with Continuous Integration for iOS Apps (Jenkins, Xcode, Cobertura and Testflight) « EclipseSource Blog

  2. Tweets that mention iOS: Setting Up a Test Environment is a Mess « Software Noise -- Topsy.com

  3. iOS: Running Cucumber/Frank with Code Coverage in Hudson « Software Noise

  4. iOS: Setting Up Acceptance Testing « Software Noise

  5. iOS: Running Unit Tests with Code Coverage in Hudson « Software Noise

  6. iOS: Setting Up Advanced Unit Testing « Software Noise

  7. iOS: Setting Up Basic Unit Testing « Software Noise

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s