Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit testing for iOS projects [closed]

I'm still relatively new to iOS development and also an absolute stranger to any kind of testing that is not compile, run, and check whatever comes to your mind.

This is obviously a weakness on any developer's profile and I'm decided to get ride of it now that interesting, real projects are coming my way.

In my quest to look for the best approach to go from 0 to 100 as soon (and well) as possible I'm coming to the specialized community to get your feedback.

At the same time I'm asking for your tips I'm also getting into Amazon to look for well-reviewed books on the subject and Google to get the rest. I'm just coming here to gather the feedback of those willing to spare a minute or to so I can probably hit jackpot with a great advise and better plan my learning strategy.

like image 949
Juan González Avatar asked Aug 21 '13 11:08

Juan González


People also ask

What is unit testing in iOS?

A unit test is a function you write that tests something about your app. A good unit test is small. It tests just one thing in isolation. For example, if your app adds up the total amount of time your user spent doing something, you might write a test to check if this total is correct.

When should unit tests be executed?

Unit testing is the first software testing phase in SDLC and it is usually taken up during the development of the application. These unit test cases are written and executed by software developers.


1 Answers

Thats right. For my job testing and test driven development is indispensable.

I often use Java and JUnit, but for Objective-C and XCode I think this screencast is a very good start: http://qualitycoding.org/objective-c-tdd/

Since I watch this screencast I use OCHamcrest and OCMockito (both explaind in this screencast) as well as SenTestingKitAsync for testing asynchronous functions.

I think the Clean Code book is a must have for every developer. There is a chapter about testing.

like image 105
Obenland Avatar answered Oct 11 '22 07:10

Obenland