Test-Driving GUIs (with RubyCocoa)

Published May 12th, 2009 Under Software Testing, TDD | Leave a Comment

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.

BDD with Cucumber

Published May 12th, 2009 Under Software Testing | Leave a Comment

Cucumber is a BDD tool that aids in outside-in development by executing plain-text features/stories as automated acceptance tests. Written in conjunction with the stakeholder, these Cucumber “features” clearly articulate business value and also serve as a practical guide throughout the development process: by explicitly outlining the expected outcomes of various scenarios developers know both where to begin and when they are finished. This video presents the basic usage of Cucumber, primarily in the context of web applications, which will include a survey of the common tools used for in-memory and in-browser testing. Common questions and pitfalls that arise will also be discussed.

Cucumber and Watir 101

Published May 7th, 2009 Under Agile | Leave a Comment

Dave Hoover demonstrates how to use Watir with Cucumber. Actually, he uses his own library SafariWatir, but you could easily swap it with Watir, FireWatir, ChromeWatir or Celerity. Cucumber lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid – all rolled into one format.   Sorry – no sound.

Executable User Stories with RSpec and BDD

Published April 14th, 2009 Under Coding | Leave a Comment

An introduction to BDD and how to make plain text User Stories executable with RSpec’s Story Framework, which is written in Ruby, but runs against production code written in any programming language.

http://www.infoq.com/presentations/hellesoy-bdd-rspec

Note: the RSpec Story runner described in this presentation has been reborn as Cucumber.

Langston’s Ant in Ruby Kata

Published March 25th, 2009 Under Coding | Leave a Comment

This is a screen cast, of Micah writing code to implement Langston’s Ant, BDD style. He uses the shiny new RubyMine IDE for development, and Limelight to run the simulation.  In martial arts, the techniques performed in kata are not always by the book. There is an aspect of art, creativity, and entertainment. At several points in this Langston’s Ant kata Micah Martin intentionally decided to bend the rules to enhance artistic and entertainment values. I leave it up to you whether I made the right compromise or not.

Source Code

« go back