Testing Your Presentation Layer

Posted in Conferences, Development, Javascript, Ruby on June 08, 2009


Testing Your Presentation Layer

Summary
In the Ruby world, no serious programmer would write an application without a comprehensive test suite. Unfortunately, the realities of integration testing the presentation layer of an Ajax-heavy web application has forced today's programmers to rely on kludges like HTML parsing in Ruby (which can't be used to test JavaScript comprehensively) or Selenium (which requires real-life browsers on every platform armed and ready). Screw that! With Johnson, a transparent Ruby to JavaScript bridge, you can test your JavaScript-heavy pages with ease. Because Johnson is embedded inside of Ruby, you'll be able to run tests directly in JavaScript, and then access JavaScript components in the tests (think Rails.dispatch_to("controller", "action")). I'll show you how to use Screw.Unit for browserless tests of your presentation layer. If you use continuous integration (and you should), you'll be able to easily catch bugs in your presentation layer without having to defer to a real browser running your tests. 

Bio
Yehuda Katz is the plugins team leader of the jQuery project. He is also a core team member of the Merb and Ruby on Rails. Yehuda currently works at Engine Yard, where he works on the Merb Ruby framework. Yehuda is the author of jQuery in Action, and is a contributing author for Ruby in Practice.

About the conference
QCon is a conference that is organized by the community, for the community.The result is a high quality conference experience where a tremendous amount of attention and investment has gone into having the best content on the most important topics presented by the leaders in our community. QCon is designed with the technical depth and enterprise focus of interest to technical team leads, architects, and project managers.

Watch Video Watch Video on External Site


Tags: Conferences, Ruby, Testing, Javascript, BDD, InfoQ, Dynamic Languages, Software Testing, QCon, Scripting, QCon San Francisco 2008, Development