O'Reilly logo

Test Driven Ajax (on Rails) by Phlip

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test Driven Ajax (on Rails)

Phlip

April 9, 2007

Abstract

The World Wide Web has come a long way from static HTML pages. Today's developers enforce and enjoy standards, and we have built the web's primitive tools into advanced libraries, frameworks, and platforms.

With these new freedoms come new responsibilities. Developers can now write some amazing bugs. A bug in a web page, hosted in a free web browser, can render expensive servers useless. Modern editors help rapidly write tangled and crufty code, the perfect habitat for bugs of every species, in situations that are hard to debug. We need help from the mortal enemy of the bug: Test-First Programming.

This Short Cut seeks fixes for the hardest situation in web development; proactive test cases for Ajax code. We survey existing techniques, and invent new ones. Our goal is heads-down programming, with-out repeatedly clicking on a web browser.

This Short Cut explores Test-Driven Development techniques for Ajax, using Ruby on Rails. We start with the Rails built-in test system, extend our focus to cover more Ajax, and then use Ajax to generate an acceptance test framework for web sites.

Prerequisites

Get ready to employ all the usual suspects:

Note

Ajax Builder::XmlMarkup CGI CSS ERb HTML HTTP JavaScript JSON Perl Prototype.js Rails Regexp REXML RJS Ruby Wiki XML XPath YAML(Syck) YPath

If any large term is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required