Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4 - 'Include Unit Tests'

Tags:

xcode

I just upgraded to XCode 4 and I was wondering if I need to 'include unit tests' when setting up an application? Also, what does that mean exactly?

like image 563
Zrb0529 Avatar asked Mar 14 '11 03:03

Zrb0529


1 Answers

You do not need to include unit tests.


What does "unit testing" mean? (from the unit-testing FAQ)

Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual function or procedure. Unit tests are created by programmers or occasionally by white box testers.

Ideally, each test case is independent from the others: substitutes like method stubs, mock objects, fakes and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended.Wikipedia

Unit testing is closely related to Test Driven Development.


@ToddH points out:

It's easier to include [unit tests] when you setup the project. If you do it later there are quite a few steps involved in doing it correctly: http://twobitlabs.com/2011/06/...

Thanks for the protip, Todd!

like image 133
Matt Ball Avatar answered Sep 17 '22 13:09

Matt Ball