Xcode 5: Unit Testing Changes

September 30th, 2013

Filed under: Xcode | 6 comments

One of the biggest areas of change in Xcode 5 involves unit testing. This post details those changes. Test Navigator Xcode 5 adds a test navigator to the available navigators on the left side of the project window. You can see an example of the test navigator in the following screenshot: The test navigator has […]

Introduction to Unit Testing with OCUnit

May 23rd, 2012

Filed under: Mac Development | 3 comments

In a previous post I covered how to setup OCUnit unit testing in Xcode 4. This post provides an introduction to writing unit tests with OCUnit, which is a unit testing framework for Objective-C code that comes with Xcode. Unit Testing Classes When writing unit tests with OCUnit, you will create one or more unit […]

Setting Up OCUnit Unit Testing in Xcode 4

May 15th, 2012

Filed under: Xcode | 1 comment

Xcode ships with OCUnit, which allows you to unit test Objective-C code. This post shows you how to setup Xcode 4 so you can unit test Cocoa and iOS applications. Create an Appropriate Project The easiest way to add unit testing support in Xcode 4 is to create a project that uses the Cocoa or […]

Xcode 4.2: Application and Logic Unit Test Classes

November 30th, 2011

Filed under: Xcode | Be the first to comment!

In Xcode 4.2 when you add a new Objective-C test case class to your project and click the Next button, you will see a Test Type menu. This menu has two choices: Application and Logic. The menu determines the unit test Xcode adds in the class’s implementation file. If you choose Application, Xcode adds a […]

Xcode 4: Unit Testing 64-Bit Mac Apps

May 12th, 2011

Filed under: Mac Development, Xcode | Be the first to comment!

When unit-testing a 64-bit Mac application, make sure the class files you are testing (your application’s implementation files) are members of the unit testing target. You will get linker errors when building the unit testing target if the class files being tested are not members of the unit testing target. How do you make a […]