The state of testing iOS apps

24 Apr 2014

I've been spending more and more time researching and thinking about testing apps in the past few months. At the university they teach you that testing (in particular Unit Testing) is an integral part of the development process that you must not skip. I've heard from many fellow students that they use testing rogoursley in their development jobs using C#, Java, etc. This is far from my experience writing iOS Apps. You can practically see the tumbleweeds crossing the testing dessert in Objective-C land.

Almost all fellow iOS developers I talk to about this are outright dismissive of the idea that testing is important. "Just write code that works", they say. This is not the kind of development culture I pride myself of being part of. With that said, let's look at the resources and tools that are availble to us.

Apple made a huge push toward testing with their release of Xcode 5 with the better integration for testing. They introduced XCTest which is their own clone of SenTestingKit and Xcode Bots for Continous Integration practices. Using these tools you can actually get very far with testing since everything you need to get started is baked right into your standard installation of Xcode.

"Alright, so I have the tools. How do I get started then?". Well, this is where I'm at a loss. In my research I have only managed to find one single book about testing as it relates to Objective-C which is Test-Driven iOS Development by Graham Lee. The book itself is pretty good but after reading it cover to cover I still feel like there is much more to be said about testing iOS apps.

Where I really started to catch on to how I approach testing is when I discovered all the great material produced by Jon Reid. Jon has a series of great posts with video tutorials about how to test-drive your MVC structure. But where things really clicked is when I watched his talk at MCE 2014 about Test-Driven Development for iOS. I embeded it below

If you have found any good resources I would love to hear about them! Catch me on Twitter.