Session

Browser-based Testing of Massive Ajax-using Rails Applications with Selenium

Till Vollmer, Codemart GmbH

Date: Wednesday 19 September 2007
Time: 14:00 - 14:45
Location: Saal Maritim C

Ruby on Rails provides a very good framework for unit, functional, and integration tests. This makes it easy for developers to assure that applications are working properly, at least theoretically. When an application works with a lot of JavaScript and Ajax to make the web application as close to a desktop application as possible these tests are not enough anymore. The caveat are the different browsers that are available and their behavior on HTML, JavaScript, Ajax, CSS, and other nasty things like timing effects.

Selenium is an open source framework that allows running acceptance tests in the browser directly. Recorded or scripted scenarios can be played back and the expected result verified. While this is very straight forwarded with normal page-based applications, without dynamic Ajax calls it is relatively tricky to implement tests for Ajax-based applications with a lot of dynamics and user interaction like drag and drop.

The talk covers testing of basic page-based Rails applications with the Selenium-on-Rails plugin, and goes further to show how tests are done for a highly dynamic Ajax-based web application with drag and drop support.

News and Coverage