Scripted GUI Testing with Ruby

Ian Dees (2008)
Review date: December, 2011

This is a short book. It only has ten actual chapters, since the first is a standard intro chapter. Chapters two through five are written around a single example, which is about testing a simple editor that can save encrypted files. An open source project called LockNote is used for that purpose. The twist is that both LockNote, a windows program, and a Swing twin of it are tested. Hence, the first part of the larger example is about setting up boiler plate code for Windows and Java Swing. In practice this involves both Ruby and JRuby. Once the basic drivers are in place, RSpec is added to the mix and the driver layer and tests are refined and polished.

The second part is more of a mixture. Chapter six is very small, and doesn't realty say anything. Chapter seven is about randomizing the tests. Next comes an interesting chapter on tabular tests; tests that are best expressed as tables. For that purpose ZenTest and Fit are used.

Chapter nine introduces Selenium and Watir, two web testing frameworks, while the following chapter is about RSpec's story runner.

The last chapter is a real bonus! It's about AppleScript and testing on the Mac platform.


I really liked this book! I seldom use this word, but I would really describe it as unpretentious. The author knows some cool techniques and writes a book about them without wasting shelf space and the reader's time by elaborating too much. It gives you a lot of inspiration, and leaves the details to other sources.

The angle of using both Windows and Swing is brilliant! I'm not likely to write huge test suites for Windows applications, but the book gave me enough understanding about the mechanisms of Ruby and Win32 API integration to make me realize what's possible and what's not. These techniques can also be applied to driver layers written in other languages. The Win32 API will remain the same.

Following through with one larger, non-trivial example is always a plus. Instead of shying away and showing the trivial, the author really nailed that one. Big portions of the encrypting editor have been tested by the time the reader reaches the end of chapter five.

The variety of topics in the remaining chapters is also a strength. After reading one of these chapters, you get the picture and are able to decide whether the particular technique or framework suits your needs or not. If so, you're free to pursue the details on your own.

The book was short, and so is the review. It's a great and very inspiring book. You finish reading it in a couple of hours (literally), and you'll be inspired to try one or two frameworks or maybe even some Win32 API.

Who should read this book

Those interested in Ruby some cool testing techniques are a natural audience.


  • 2015-09-29

    It's been almost one and a half year since I reviwed a book! I've been too absorbed by Writing my own. Anyway, I'm back with Jeff Patton's relatively...
  • 2014-01-04

    New category! Performance! Reviewed The Every Computer Performance Book. Check it out!
  • 2013-09-10

    Reviewed a book that' slightly less technical, but much more fun to read. It's I.T. Confidential.
  • 2013-08-13

    Reviewed yet another book on Visual Studio 2012 and TFS. I also created a "Microsoft" category and moved the other TFS book there from the "Tools"...
  • 2013-08-05

    Updated the FAQ. Included information about getting a book reviewed.