Unit Testing

  • I'm looking for a unit testing framework for Cocoa. I've heard that
    there is one called OCUnit that's included with Xcode, but I can't
    seem to find it anywhere on my system. Since I'm new to use it with a
    new application, I would prefer one that worked with Objective-C 2.0.

      What are some of my options?

    Omar Qazi
    Synergick Software
    1.310.294.1593
  • On Dec 29, 2007, at 00:07, Omar Qazi wrote:

    > I'm looking for a unit testing framework for Cocoa. I've heard that
    > there is one called OCUnit that's included with Xcode, but I can't
    > seem to find it anywhere on my system. Since I'm new to use it with
    > a new application, I would prefer one that worked with Objective-C
    > 2.0.
    >
    > What are some of my options?

    See "Test Driving Your Code with OCUnit": <http://developer.apple.com/tools/unittest.html>
    And "Unit Testing Guide": <http://developer.apple.com/documentation/DeveloperTools/Conceptual/UnitTest
    ing/UnitTesting.html
    >

    /brian
  • On Dec 28, 2007, at 9:07 PM, Omar Qazi wrote:

    > I'm looking for a unit testing framework for Cocoa. I've heard that
    > there is one called OCUnit that's included with Xcode, but I can't
    > seem to find it anywhere on my system. Since I'm new to use it with
    > a new application, I would prefer one that worked with Objective-C
    > 2.0.

    The OCUnit unit testing framework included with Xcode is called
    SenTestingKit.framework on disk, as that's been the name of the
    framework for nearly 10 years now.  (I believe it even predates JUnit,
    since it's a direct derivative of Kent Beck's Smalltalk Testing
    framework.)

    A good place to start with Cocoa unit testing is the Unit Testing
    Guide, as Brian Christensen pointed out.  After reading that, you may
    also want to check some of my weblog posts tagged with "unit testing"
    here: <http://chanson.livejournal.com/tag/unit+testing>.  A good place
    to start would be <http://chanson.livejournal.com/119097.html>, which
    contains links to various how-to posts.

    Under that tag, I also talk a bit about how easy it is to specify your
    user interface with Cocoa and unit tests.  It's a lot more
    straightforward than in some other frameworks because Cocoa lets you
    just test the connections between your UI and your controller or model
    layer code, rather than try to simulate events and push them through
    your UI to verify its behavior.  If the connections (outlets, target-
    action, and bindings) are set up correctly, you can be reasonably
    certain that the behavior will be correct.

      -- Chris
  • Hi Omar,

    I just wrote up a tutorial on getting unit testing going in a cocoa
    app on my blog.

    Hope it helps,

    -bd-
    http://bill.dudney.net/roller/objc

    On Dec 28, 2007, at 10:07 PM, Omar Qazi wrote:

    > I'm looking for a unit testing framework for Cocoa. I've heard that
    > there is one called OCUnit that's included with Xcode, but I can't
    > seem to find it anywhere on my system. Since I'm new to use it with
    > a new application, I would prefer one that worked with Objective-C
    > 2.0.
    >
    > What are some of my options?
    >
    > Omar Qazi
    > Synergick Software
    > 1.310.294.1593
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today