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 -- Google Search and Visible Text Result Confirmation
eValid Home

Background
This example shows the ease with which eValid can confirm basic viability of multiple search engines.

Script Description
This example playback script uses eValid "motion commands" to run and confirm the search. The search engine used here is Google, but it could be any other search engine.

The activity is expressed parametrically, as follows: run a search on webpage $HOME for the specified search $SEARCH and then, after the search completes, confirm that the expected result, $TARGET, appears on the first page of the search. The key parts of the input.evs script are as follows:

  1. InitLink "http://$HOME/"
  2. IndexFindElement 0 DOWN "name" "q" ""
  3. IndexInputValue 0 "TEXT" "$SEARCH" "" ""
  4. IndexFindElement 0 DOWN "name" "btnG" ""
  5. IndexFollowLink 0 ""
  6. MatchString 0 "$TARGET" 0

Here is how this script works when interpreted by eValid:

  1. Directs eValid to the specific start page $HOME for the search.
  2. Finds the index of the page element that corresponds to the q tag, which is known in advance to be what Google uses for the search tag's "Search Input" (this tag name is independent of the host language). Once found, eValid remembers this index internally.
  3. Feeds the $SEARCH string value into the search-for field.
  4. Finds the location of the "Google Search" button, which is known in advance to be "btnG".
  5. Goes ahead and clicks that button.
  6. Confirms that there is visible text on the page that matches the $TARGET value. The trailing "0" here implies a "case independent" match.

Running Multiple Tests
This script is specified parametrically, so you can conveniently run this kind of sequence:
    . . .
    CallScript "input.evs" "$HOME=www.google.com $SEARCH=Apple $TARGET=ipod"
    CallScript "input.evs" "$HOME=www.google.fr $SEARCH=Apple $TARGET=ipod"
    CallScript "input.evs" "$HOME=www.google.de $SEARCH=Apple $TARGET=ipod"
    . . .

Each invocation of input.evs substitutes values as indicated. In this case we are trying out three of Google's country-dependent top pages.

Results
The screenshot below shows the actual playback times for 15 different countries' playbacks.

In the above image the 5th column shows the total elapsed time for each script; in this particular run all 15 scripts required 37.453 msec total to run. The elapsed time figures are ONLY for the interval between ResetTimer and ElapsedTime (see script below).

Scripts
Here are the actual scripts used:


# eValid Script: input.evs
# Recording by eValid V9 

ProjectID "Motion"
GroupID "Google1"
TestID "input"
LogID "AUTO"

ScreenSize 1280 1024

DeleteCache
DeleteCookies

ResetTimer
InitLink "http://$HOME/"
IndexFindElement 0 DOWN "name" "q" ""
IndexInputValue 0 "TEXT" "$SEARCH" "" ""
IndexFindElement 0 DOWN "name" "btnG" ""
IndexFollowLink 0 ""
MatchString 0 "$TARGET" 0
ElapsedTime "$HOME"

# End of script.

# eValid Script search.evs
# Recording by eValid V9 

ProjectID "Motion"
GroupID "Google1"
TestID "search"
LogID "AUTO"

CallScript "input.evs" "$HOME=www.google.com	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.fr	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.de	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.cn	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.it	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.be	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.no	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.ru	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.jp	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.in	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.es	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.bg	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.pl	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.pt	$SEARCH=Apple	$TARGET=ipod"
CallScript "input.evs" "$HOME=www.google.fi	$SEARCH=Apple	$TARGET=ipod"

# End of script.