MountainWest RubyConf 2009: Test-driving GUIs (with RubyCocoa)

Posted in Conferences, Development, Testing, Operating Systems on March 29, 2009

Test-driven design is probably more popular in the Ruby community than in other language communities. Nevertheless, test-driven design of graphical user interfaces is still seen as something of a black art.

In this talk, I’ll demonstrate how to test-drive a Mac GUI, using either RubyCocoa or MacRuby. I’ll concentrate on opening a File Chooser, then move to drag-and-drop (if there’s time). Along the way, you’ll also see Shoulda, Assert{2.0}, and some hackery on top of FlexMock.

Although the Mac’s GUI framework is probably friendlier to test-driven design than most, the principles should be broadly applicable.

Brian Marick was a programmer, tester, and team lead in the 80’s, a testing consultant in the 90’s, and is mostly an Agile consultant this decade. He was one of the authors of the “Manifesto for Agile Software Development” and is the author of three books (The Craft of Software TestingEveryday Scripting with Ruby, and the forthcoming RubyCocoa). He learned Ruby in 2001 after he told two people on a shuttle bus that he was kind of liking Python. They turned out to be Andy Hunt and Dave Thomas, and they would not permit him to leave the bus until he agreed to purchase the first edition of the Pickaxe book.

Author: Brian Marick

Watch Video Watch Video Watch Video on External Site

Tags: Conferences, Ruby, Testing, OS, MacOS, RubyCocoa, Confreaks, MountainWest RubyConf 2009, FlexMock