Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- Testing AJAX Applications -- Script Development Methodology
eValid Home

Key Ideas
  • AJAX applications, asynchronous by nature, are difficult to test.
  • A good AJAX test plays back fully synchronized without relying on Waits.
  • Several methodologies support creating such tests.
  • Experimentation is usually required.

Background
AJAX applications, by their nature, behave asynchronously with respect to the user. The underlying "AJAX engine" processes actions ahead of, in parallel with, and even long after a user makes a request.

The usual methods test recording of associating a user action with a specific future action to take -- in effect writing down a future instruction for the playback engine to follow -- no longer apply. What you see and what you do no longer DIRECTLY affects what you see next.

That's the benefit of AJAX's asynchronous nature. An AJAX application can do things that would otherwise frustrate the user, thereby significantly enhancing the quality of the user's experience using the application.

Reality Check
The fact is, in testing an AJAX application, the issues is usually not whether a recording from life would work reliably, but whether any script can be manipulated to reliably play back at all! Arriving at a Wait-time independent, reliable (synchronized) playback script is the real goal.

A Baseball Metaphor: How do you explain to someone how to hit a baseball? It's a simple enough notion: you stand at the plate, watch the ball as it's pitched, swing the bat at the right time, hit the ball right on the bat's sweet spot, and watch the ball fly over the center field fence! Home Run!

If it were that easy to do we'd all be Babe Ruth (sorry, Barry Bonds). But don't try to tell a slugger that it's impossible: they just do it! Ask a slugger how he does it and he'll say, "I just do it, but I don't know how to explain it. You've got to learn to do it by yourself."

Methodology Options
It's very difficult to define a precise methodology that applies the test script development for AJAX applications, but what appears below are some options that you can apply, accompanied with very general outline of "how to do it."

Resources
Here are resources that will assist in creating reliable functional and loading tests for AJAX applications.