Your e-Business Quality Partner eValid™ -- The Web Quality Suite
Browser-Based Client-Side Functional Testing and Validation Page Timing/Tuning Transaction Monitoring. WebSite Spidering & Analysis and Realistic Server Loading.

eValid -- "MooTools" AJAX Synchronization Example
eValid Home

Summary
This page show a simple example that uses eValid's capability to synchronize a Web 2.0 example. The example is based on making recordings from the MooTools Autocomplete AJAX example page.

The main points that this sequence of activity makes are the following:

  1. The initial recording in moo1.evs is made "from life" and runs OK by relying on the natural recorded time delays.
  2. If you simulate a "too slow" server by speeding up the playback the playback will de-synchronize.
  3. You can add a simple Sync-On-Text command (either by editing or by recording) to assure that the moo2.evs script runs the application fully synchronized.
  4. If you are concerned about page stability (e.g. for use in a monitoring context) you can augment the script with index/motion commands to produce moo3.evs. This script is largely invulnerable -- that is, it plays back reliably within a broad range of structural and content changes in the application.

Example Explanation Sequence
Here step by step are the various pieces of the example.

  1. Starting Page
    Here is the starting page for all of these scripts.

    eValid

  2. Initial Script
    This runs fine in real time, but fails when you try to speed it up. It was recorded "from life" and includes real-time delays. In practice, if there is enough server capacity, this script plays back reliable using the waits to provide the needed synchronization.
    # Recording by eValid V9
    # Copyright © 2009 by Software Research, Inc. 
    # Recording made on: Microsoft Windows XP Service Pack 3 (IE 7.0.5730.13), HostName "Peru"
    # 
    ProjectID "Project"
    GroupID "Webinar"
    TestID "moo1"
    LogID "AUTO"
    
    ScreenSize 1280 1024
    FontSize 0
    DeleteCache
    DeleteCookies
    InitLink "http://www.ajaxdaddy.com/mootools-autocomplete.html"
    Wait 9141
    InputValue 0 16 "TEXT" "" "search" "usa" "" "number:1"
    Wait 2500
    InputValue 0 20 "TEXT" "" "search" "puppy" "" "number:1"
    Wait 3140
    InputValue 0 24 "SELECT-ONE" "" "select-1" "To Check IE bug." "2" "number:1"
    # Recording stopped at:  <2009/05/20 12:57:46>

  3. Script With Natural Sync
    Here is the output after running this script, using a Delay Multiplier of 1.0.

    eValid

  4. Script Playback With Delay Multiplier = 0
    Here is what you get when you run the above script with a Delay Multiplier of 0. The page with the input fields is not fully downloaded before the script tries to type into the page.

    eValid

  5. Script With Text Sync
    This now runs fine no matter how fast you try to make it go.
    # Recording by eValid V9 
    # Copyright © 2009 by Software Research, Inc. 
    # Recording made on: Microsoft Windows XP Service Pack 3 (IE 7.0.5730.13), HostName "Peru"
    # Recording started at: <2009/05/20 12:57:30>  
    # 
    ProjectID "Project"
    GroupID "Webinar"
    TestID "moo2"
    LogID "AUTO"
    
    ScreenSize 1280 1024
    FontSize 0
    DeleteCache
    DeleteCookies
    InitLink "http://www.ajaxdaddy.com/mootools-autocomplete.html"
    Wait 9141
    SyncOnText 0 "a country name" "number:1"
    
    InputValue 0 16 "TEXT" "" "search" "usa" "" "number:1"
    Wait 2500
    InputValue 0 20 "TEXT" "" "search" "puppy" "" "number:1"
    Wait 3140
    InputValue 0 24 "SELECT-ONE" "" "select-1" "To Check IE bug." "2" "number:1"
    # Recording stopped at:  <2009/05/20 12:57:46>

  6. Script Made Invulnerable to Page Structure Changes
    Now the script runs fine and will tolerate a wide range of page changes. The items to be used in the IndexFindElement commands were identifed using the PageMap to look into the DOM of the page and find the appropriate element names and values.
    # Recording by eValid V9 
    # Copyright © 2009 by Software Research, Inc. 
    # Recording made on: Microsoft Windows XP Service Pack 3 (IE 7.0.5730.13), HostName "Peru"
    # Recording started at: <2009/05/20 12:57:30>  
    # 
    ProjectID "Project"
    GroupID "Webinar"
    TestID "moo3"
    LogID "AUTO"
    
    ScreenSize 1280 1024
    FontSize 0
    DeleteCache
    DeleteCookies
    InitLink "http://www.ajaxdaddy.com/mootools-autocomplete.html"
    Wait 9141
    SyncOnText 0 "a country name" "number:1"
    
    #InputValue 0 16 "TEXT" "" "search" "usa" "" "number:1"
    IndexSet 0
    IndexFindElement 0 DOWN "innerText" "Local - enter a country name" "number:1"
    IndexFindElement 0 DOWN "tagName" "INPUT" "number:1"
    IndexInputValue 0 "TEXT" "usa" "" "number:1"
    
    Wait 2500
    InputValue 0 20 "TEXT" "" "search" "puppy" "" "number:1"
    Wait 3140
    InputValue 0 24 "SELECT-ONE" "" "select-1" "To Check IE bug." "2" "number:1"
    # Recording stopped at:  <2009/05/20 12:57:46>