Monday, April 09, 2007

Mac Users: Add Unit Tests To Your Xcode Project :-

Some people may already know about this, but still I am posting this hint to this Blog with an intension that everybody should aware of this important Xcode supported feature...

A unit test is simply a piece of code that exercises some part of your application. The unit test provides a specific input and expects your code to return a specific output. If your code returns an unexpected value, the unit test reports the lack of compatibility error. This will verify that newly introduced code does not break any existing behavior.

Third-party unit testing modules have been available for Xcode for some time. In addition, Xcode 2.1 now integrates some modules directly into the project environment.

These modules provides the basic testing tools needed to build automated and repeatable test suites.

Support for Objective-C test cases is provided by the SenTestingKit framework.
Support for C and C++ test cases is provided by the CPlusTest framework.

Educative Link:
http://developer.apple.com/documentation/DeveloperTools
/Conceptual/UnitTesting/Articles/CreatingTests.html