Test-Driven Ajax

keywords:
room: Sheraton Hall B, LC — time: Tuesday 10:45-12:15
Average Rating: -

Ajaxified web applications bring new challenges to the field of test-driven development: JavaScript, dom manipulation, drag N drop, distribution, asynchronous commmunication, mash-ups, browser-incompatibilities, framework creep and more. How far do you get with proven tools and methods? Where do the known techniques still work? Where do we have to introduce new tools and methods? Will there still be some holes in our “web” of unit and acceptance tests?

I’ll present the topic from a Java developer’s point of view showing a working example with many testing problems tackled and even a few solved.

Topics covered in the talk:

  • How much unit testing makes sense for the JavaScript client and what tools are available for that?
  • How can you mock away the asynchronous communication via XMLHttpRequest?
  • How can you deal with the dependency on other frameworks like Google Maps (tm)?
  • What’s a suitable way to decouple client from server in order to facilitate testing?
  • What are your options for running repeatable integration and acceptance tests?

Most techniques will be shown in a working example that builds on Prototype, Scriptaculous, Google Maps (tm) and others.

Tools shown and used are: Scriptaculous Testing Framework, JsMock, JsTester, JUnit, Fit, HtmlUnit, Selenium, WebTest.

Participants should know the basics of TDD and Ajax.

Process/Mechanics

It’s going to be an old-fashioned talk. Demos and Q&A included. Code on the slides. Working code being run.

I probably coud strip it down to 60 minutes - if there will be 60-minute-slots.