🕷 software projects

by ryan davis



GUI testing for macruby projects

minitest-macruby provides extensions to minitest for macruby UI testing. It provides a framework to test GUI apps in a live instance. Documentation and examples are light at the moment as I’ve just thrown this together. Suggestions for extensions are very welcome!

Currently it provides the following methods in minitest’s assertions:

  • self.run_macruby_tests
  • find_ui_menu(*path)
  • find_ui_menu_items menu
  • assert_ui_menu menu, *items
  • find_ui_menu_item(*path)
  • assert_ui_action obj, target, action, key = nil
  • assert_ui_binding item, binding_name, target, path

Features & Problems

  • Provides extensions to your test cases to help test OSX GUI apps.
  • Still needs spit and polish.


~~~ ruby new, open, _, close, save = find_ui_menu_items “File”

assert_ui_action new, delegate, “new_document:”, “n” assert_ui_action open, delegate, “open_document:”, “o” assert_ui_action close, delegate, “close_document:”, “w”

assert_ui_binding close, :enabled, delegate, has_window end

Get The Code

If you just want to use minitest-macruby, you can install it via RubyGems:
gem install minitest-macruby
Fork me on GitHub If you want to hack on minitest-macruby, clone it from GitHub:
git clone git://github.com/seattlerb/minitest-macruby

Latest Activity