Loading ...
Sorry, an error occurred while loading the content.

Unit testing Cocoa user interfaces

Expand Messages
  • Chris Hanson
    A long time ago I promised to several people on a couple of lists that I d write up my approach to doing user interface unit testing with the Cocoa framework
    Message 1 of 3 , Jul 3, 2006
    • 0 Attachment
      A long time ago I promised to several people on a couple of lists
      that I'd write up my approach to doing user interface unit testing
      with the Cocoa framework on Mac OS X. My initial write-up a year ago
      was a philosophical discussion of my approach, which I call "trust,
      but verify" and can be found here:

      http://chanson.livejournal.com/118380.html

      I've just written up an additional post that describes how to
      actually write OCUnit unit tests that verify the controls in a Cocoa
      window are set up correctly.

      http://chanson.livejournal.com/148204.html

      Note that I'm not trying to teach the Objective-C language, the
      Cocoa framework, the OCUnit unit testing framework, or the out-of-the-
      box integration of OCUnit into Apple's Xcode IDE in this post. Info
      on all of those can be found at <http://developer.apple.com/>. (I
      also have a bunch of info available via the tags on the two posts.)

      I hope someone else finds this useful. I find that this approach
      makes it very straightforward to do test-driven development of user
      interfaces without having to change the either design patterns I'm
      using to build my software or the approach to tools like Interface
      Builder.

      -- Chris
    • Pete Wright
      That s a pretty cool article and there s a bunch to learn there for programmers of not just Cocoa, but all UI centric frameworks (Windows.Forms in .NET, Swing
      Message 2 of 3 , Jul 4, 2006
      • 0 Attachment
        That's a pretty cool article and there's a bunch to learn there for
        programmers of not just Cocoa, but all UI centric frameworks
        (Windows.Forms in .NET, Swing etc) Thanks for the pointer!

        --------------------------------------------------
        Peter Wright
        froogle@...

        Personal Blog -> http://peterwright.blogspot.com
        Agile Development Blog -> http://exceeding-expectations.blogspot.com




        On 4 Jul 2006, at 00:47, Chris Hanson wrote:

        > A long time ago I promised to several people on a couple of lists
        > that I'd write up my approach to doing user interface unit testing
        > with the Cocoa framework on Mac OS X. My initial write-up a year ago
        > was a philosophical discussion of my approach, which I call "trust,
        > but verify" and can be found here:
        >
        > http://chanson.livejournal.com/118380.html
        >
        > I've just written up an additional post that describes how to
        > actually write OCUnit unit tests that verify the controls in a Cocoa
        > window are set up correctly.
        >
        > http://chanson.livejournal.com/148204.html
        >
        > Note that I'm not trying to teach the Objective-C language, the
        > Cocoa framework, the OCUnit unit testing framework, or the out-of-the-
        > box integration of OCUnit into Apple's Xcode IDE in this post. Info
        > on all of those can be found at <http://developer.apple.com/>. (I
        > also have a bunch of info available via the tags on the two posts.)
        >
        > I hope someone else finds this useful. I find that this approach
        > makes it very straightforward to do test-driven development of user
        > interfaces without having to change the either design patterns I'm
        > using to build my software or the approach to tools like Interface
        > Builder.
        >
        > -- Chris
        >
        >
        >



        [Non-text portions of this message have been removed]
      • Phlip
        ... Could someone who knows Cocoa report how those pages use (or obviate) the Reveal() technique? -- Phlip http://c2.com/cgi/wiki?ZeekLand
        Message 3 of 3 , Jul 8, 2006
        • 0 Attachment
          Pete Wright wrote:

          > That's a pretty cool article and there's a bunch to learn there for
          > programmers of not just Cocoa, but all UI centric frameworks
          > (Windows.Forms in .NET, Swing etc) Thanks for the pointer!

          Could someone who knows Cocoa report how those pages use (or obviate)
          the Reveal() technique?

          --
          Phlip
          http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
        Your message has been successfully submitted and would be delivered to recipients shortly.