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 -- Search Engine Optimization -- Demonstration Script #1
eValid Home

Summary
This page presents eValid's solution to performing the most common action that someone performing Search Engine Optimization (SEO) wants to do: determining if a search term used in a particular search engine returns a result that provides a link to a desired target domain name. The testing process used in this example involves these main steps:

  1. Navigate to the chosen search-engine's starting page.
  2. Enter the search term on the chosen search-engine's entry page and initiate the search process.
  3. Wait until the search engine results are generated (this may require synchronization for an AJAX based search engine).
  4. Examine the search results page to see if there is a link to a specified target domain name. If so, record success for that search string and quit.
  5. Or else, note that there was no successful match found.

Description Of Solution
The parametric script below represents the general solution to the basic SEO question. The key parameters used in this script are the following:

eValid has several alternative ways to deliver values to the parameters in the script, including use of Environment Variables, the Data Synthesis feature, or assignment of values via a Command Line batch invocation. In all cases $SEARCH and $URL are supplied by the user and all of the other values are taken from the parametric values table. In this example, however, we concentrate just on the parametric script and how it works.

Script Description
The developed script involves the following steps:

  1. Do the necessary setup steps, including deleting the cache and cookies (to assure a known starting state), and declaring the script that catches any ERRORs. Note that there is an OnErrorGoScript to a script called stopit.evs which records any failures that occur during script execution.

  2. Go to the starting page, $ENGINE. This done with a standard InitLink or GotoLink command.

  3. Find the location of the search-for string input area. This is done with Index Motion, which finds the right place on the screen to type in the search-for string.

  4. Type in the search-for string. This is a simple use of the IndexInputValue command.

  5. Wait until the search results are found (synchronization). The easiest synchronization is on the appearance of the search-for string in the results page (to show it has been completely loaded).

  6. Confirm that the target URL exists inside the results page.

  7. Record success with various message(s) to an output text file.

Example Script
Here is the eValid script developed as detailed above.

# Basic search engine script, fully parameterized...

# Step 1...
ProjectID "FunctionalTests"
GroupID "SEO"
TestID "search"
LogID "AUTO"

OnErrorGoScript "stopit.evs"

# Step 2...
ResetTimer
GotoLink 0 "http://$ENGINE/" ""
Wait 100

# Step 3...
IndexSet 0
IndexFindElement 0 DOWN "$SNAME" "$SVALUE" ""
Wait 100
IndexInputValue 0 "TEXT" "$SEARCH" "" ""
Wait 1000
ElapsedTime "Search is set up..."

# Step 4...
IndexSet 0
IndexFindElement 0 DOWN "$ANAME" "$AVALUE" ""
Wait 1000
IndexFollowLink 0 "" NO_NAV
Wait 100
ElapsedTime "Search is started...".

# Step 5...
SyncOnText 0 "$SEARCH" 
Wait 100
ElapsedTime "Search results have synchronized..."

# Step 6...
MatchString 0 "$URL" 0
IndexSet 0
IndexFindElementEx 0 DOWN "name:tagName" "value:A" "name:href" "value:$URL" ""

# Write results file to confirm
SaveMessage "pageresults.txt" "$ENGINE: $SEARCH found with $URL" APPEND
SaveRecord pageresults.txt "/n" 
Wait 100

# Step 7...
ElapsedTime "Results confirmed..."

# End of script.

Script Execution And Results Reporting
As already mentioned, there are multiple ways to invoke the parametric script. The outputs generated when you run the script against multiple targets remain in the same format.

Here are samples of the two primary output files: (1) the timing data that results from the ElapsedTime commands, and, (2) the confirmation of properties of the search results file. Note that the third test resulted in the search target NOT being found.

ElapsedTime Results

Timer Reset [0.0]
Command completed: ResetTimer
[Time Elapsed: 3.094] Search is set up...
[Time Elapsed: 4.797][Since Last Elapsed Time: 1.703] Search is started...
[Time Elapsed: 4.967][Since Last Elapsed Time: 0.170] Search results have synchronized...
Number of matches made: 192 of 15406 total attempts
[Time Elapsed: 7.440][Since Last Elapsed Time: 2.473] Results confirmed...

Timer Reset [0.0]
Command completed: ResetTimer
[Time Elapsed: 7.822] Search is set up...
[Time Elapsed: 10.806][Since Last Elapsed Time: 2.984] Search is started...
[Time Elapsed: 11.347][Since Last Elapsed Time: 0.541] Search results have synchronized...
Number of matches made: 493 of 40102 total attempts
[Time Elapsed: 16.174][Since Last Elapsed Time: 4.827] Results confirmed...

Timer Reset [0.0]
Command completed: ResetTimer
[Time Elapsed: 71.473] Search is set up...
[Time Elapsed: 73.055][Since Last Elapsed Time: 1.582] Search is started...
[Time Elapsed: 74.077][Since Last Elapsed Time: 1.022] Search results have synchronized...

...

Results File Analysis Results

www.google.com: eValid found with www.sr-corp.com
www.yahoo.com: eValid found with www.sr-corp.com
www.aol.com: eValid not found with www.sr-corp.com
...