danlucraft /blog

New project: Gutkumber - Integration testing for Ruby-GNOME2

May 2009 • Daniel Lucraft

Gutkumber is a small set of Ruby-GNOME2 automation helpers. It comes with Cucumber formatters and some steps for writing features. This allows you to test the full application stack, driving the real Gtk GUI with simulated keyboard events, and using assertions that can refer to contents of Gtk widgets.

http://github.com/danlucraft/gutkumber/tree/master

I’ve been using Gutkumber on the Redcar editor project for a while now, and it seems to work well. Here is an example of the kind of features you can write with Gutkumber:

Scenario: Kill line
  When I type "def foo"  
  And I press "Left" then "Left"
  And I press "Ctrl+K"
  ... some Redcar specific assertions

Scenario: Open a file
  When I press "Ctrl+O"
  And I set the "Open" dialogs filename to "plugins/edit_tab/features/fixtures/file1.rb"
  And I click the button "Open" in the dialog "Open"
  ... some Redcar specific assertions

This is still in early development (it’s probably the most rough and ready software I’ve ever released!). But I’m finding it useful and I thought it would be good to demonstrate that it is possible to thoroughly integration test your Ruby-GNOME2 applications.

I’m writing new steps and helpers as I go along, but they are quite specific to my application, so you will probably find you need to write more. It’d be great if we could build the set of helpers and steps to the point where it contains everything needed to test new Ruby-GNOME2 apps.

blog comments powered by Disqus