Webrat: Rails Acceptance Testing Evolved
Location: Pavilion 2 - 3
A robust suite of acceptance tests ensures your Rails app stays working giving you extreme freedom to refactor. Unfortunately, traditional full-stack acceptance testing of web-based applications has centered on in-browser solutions like Selenium and Watir that immediately present challenges like speed, timing/waiting and sharing data across processes, all through a relatively clunky API designed without Ruby in mind. Getting started was troublesome, and keeping things running smoothly was a constant concern.
Webrat, a Ruby DSL for interaction with web applications, changes the acceptance testing ROI equation. By implementing an invisible, fast browser simulator you can use from within your test framework of choice (Test::Unit, RSpec, Shoulda or Cucumber), it sidesteps most of Selenium’s drawbacks while retaining the coverage value.
Recently, seamless Webrat integration featured prominently in the Merb 1.0 release as the recommended approach for high level testing, a theme that will be a part of the Rails 3 push. Webrat is fast becoming the ubiquitous API for driving web applications from Ruby with it’s support for different adapters like Selenium, Mechanize and Celerity.
People planning to attend this session also want to see:
Bryan Helmkamp is the lead maintainer of Webrat, a library to implement acceptance testing of a Ruby web application in a more expressive and maintainable way. He’s a co-author of The RSpec Book, which is now available as a beta PDF. Following three years of Ruby on Rails consulting, Bryan is now a software engineer at Weplay, a New York City-based startup building online tools for the youth sports community. Bryan’s software development blog is located at http://brynary.com/.
Comments on this page are now closed.