Saturday, July 19, 2008

Summary of AJAX Synchronization Support

Experienced web testers know this too well: AJAX applications are often very difficult to test reliably because they are, after all, inherently asynchronous (AJAX = Asynchronous JavaScript and XML). The problem is that a test recording, one made for example with the "real time recording" setting turned on, will play back perfectly well for a while, but will get out of synchronization when the target website is running slower. The asynchronous JavaScript executions almost always fail to sync using simple Wait times. Something more -- much more -- is needed, and eValid has what is needed.

But not every test command (test action) requires extrinsic synchronization, and in many cases the extra step of having to figure out how to add in a synchronization step isn't even necessary because the intrinsic synchronization is good enough. This table summarizes all of eValid's Synchronization Modes. As you can see there are many different ways that playback synchronization can be maintained.

For tough AJAX applications you usually need to rely on one of the DOM-based synchronization modes, e.g. SyncOnElementProperty or SyncOnText. Those commands need to have their parameters filled in manually through use of the PageMap facility to find the right element properties (attributes) and their values. Our worked example that shows how we test the Google Gmail Example is a good illustration of how this works out in practice

No comments: