|
Summary
AJAX (Asynchronous JavaScript and XML) is
a web application implementation method that
disconnects some page updating activities from the
normal browser display in favor of having the "housekeeping" done
by a background interaction between the browser and the server,
moderated in some cases by special XML and JavaScript supplied operations.
A major difficulty in testing an AJAX application is the very nature of the implementation: it may involve asynchronous operations. In practice this shows up as a script "typing ahead" of the browser, and this kind of behavior almost always leads to loss of state information and failure of the test.
eValid has natural (automatic) and several manually augmented ways to assure synchronized playback for AJAX applications. Our experience is that one or more of these methods allows a script to play back reliably and still support full validation capabilities within the subject pages. In many cases, the built-in "natural synchronization" is sufficient.
Synchronization Method Summary
Here is a summary of available script playback synchronization methods.
Here is a page that describes Applying the SyncOnURL Command for playback synchronization.
Here is a description of Testing the Google Gmail Application that illustrates how this works.
This method requires that you record a SyncOnScreenRect command that records a checksum of the pixel values in a particular part of a screen which eValid records from. At playback time eValid rechecks the value of the current checksum, and waits until the checksum matches before continuing playback.
Cautionary Notes
The eValid playback engine is a complex multi-threaded activity
and multiple confirmations of achieving synchronization may
be required in difficult cases.
It is easy to be deceived by some browser and/or Windows messages.
For example:
"Done" is not necessarily done;
"In focus" may not necessarily mean that a window is
actually in focus.
In addition, autonomous actions by the browser may defeat the best natural [built in] synchronizations. Finally, you may need to pay special attention to a particular web applications' initial state.