Demo-Web-Test

From iMacros
Jump to: navigation, search

This example demonstrates the use of the Stopwatch command for webtesting. It can be used with the IE Plug-in, the Firefox Add-on and within the iMacros Browser.

Here we test the overall time taken to login and perform a Trademark search at the US Patent and Trademarks Office website, as well as the time for the page to load, the search to return its results and the documents retrieval page to load.

The macro can be run at various times to produce results for different times of the day and night, when the load on the website varies. For this site there is heavy usage during the US working day, but much lower usage at night.

A .csv file is generated by the first run, and then subsequents runs appends time and date stamped data to the file, allowing for easy comparison in MS-Excel or other spreadsheet package.

Macro code for IE plug-in and iMacros Browser iMacros BrowserIE Plug-in:

VERSION BUILD=10.4.28.1074
TAB T=1         
TAB CLOSEALLOTHERS  
SET !FILESTOPWATCH usptoTimings.csv   
STOPWATCH ID=fullsearch 
STOPWATCH ID=websiteload
URL GOTO=http://www.uspto.gov/#     
SIZE X=820 Y=713 
STOPWATCH ID=websiteload
TAG POS=1 TYPE=A ATTR=TXT:Trademarks   
TAG POS=1 TYPE=A ATTR=TXT:Quick<SP>Links
TAG POS=1 TYPE=A ATTR=TXT:TESS
TAG POS=1 TYPE=A ATTR=TXT:Word<SP>and/or<SP>Design<SP>Mark<SP>Search<SP>(Free<SP>Form)  
STOPWATCH ID=search
TAG POS=1 TYPE=TEXTAREA FORM=NAME:search_text ATTR=NAME:p_s_ALL CONTENT=78829872[SN]<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:search_text ATTR=NAME:a_search
STOPWATCH ID=search 
STOPWATCH ID=opendocument
TAG POS=1 TYPE=IMG ATTR=SRC:http://tmsearch.uspto.gov/webaka/icon/reg/tsdr.gif
STOPWATCH ID=opendocument    
BACK    
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/bin/gate.exe ATTR=NAME:a_logout  
STOPWATCH ID=fullsearch 

Macro code for Firefox add-on Firefox:

VERSION BUILD=8920312 RECORDER=FF
TAB T=1         
TAB CLOSEALLOTHERS  
SET !FILESTOPWATCH usptoTimings.csv   
STOPWATCH ID=fullsearch 
STOPWATCH ID=websiteload
URL GOTO=http://www.uspto.gov/#     
'
STOPWATCH ID=websiteload
TAG POS=1 TYPE=A ATTR=TXT:Trademarks   
TAG POS=1 TYPE=A ATTR=TXT:Quick<SP>Links
TAG POS=1 TYPE=A ATTR=TXT:TESS
TAG POS=1 TYPE=A ATTR=TXT:Word<SP>and/or<SP>Design<SP>Mark<SP>Search<SP>(Free<SP>Form)  
STOPWATCH ID=search
TAG POS=1 TYPE=TEXTAREA FORM=NAME:search_text ATTR=NAME:p_s_ALL CONTENT=78829872[SN]<SP>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:search_text ATTR=NAME:a_search
STOPWATCH ID=search 
STOPWATCH ID=opendocument
TAG POS=1 TYPE=IMG ATTR=SRC:http://tmsearch.uspto.gov/webaka/icon/reg/tsdr.gif
STOPWATCH ID=opendocument    
BACK    
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/bin/gate.exe ATTR=NAME:a_logout  
STOPWATCH ID=fullsearch