Demo-Stopwatch
From iMacros
Measure detailed website response times with the STOPWATCH command.
For more information on performance testing please see also the performance testing demo video
This demo works with the following page: http://www.iopus.com/imacros/demo/v6/stopwatch.htm
Macro Code
VERSION BUILD=303804 TAB T=1 TAB CLOSEALLOTHERS 'Change the default stopwatch file name: 'The file is saved to the Internet Macros DOWNLOAD folder ' SET !FILESTOPWATCH demo-stopwatch.csv 'Note: Use SET !FILESTOPWATCH NO if you do NOT need a response time log file (for example, if you return the values to the Scripting Interface via EXTRACT) ' 'Start reponse time measurement 'Measure total macro runtime STOPWATCH ID=Total 'Measure load time for first page STOPWATCH ID=Firstpage URL GOTO=http://www.iopus.com/imacros/demo/v6 STOPWATCH ID=Firstpage ' ' 'Add the measured response time to EXTRACT to return it to Scripting Interface. See the "get-response-time.vbs" example script for details 'If you use the log file only, you do NOT need this line SET !EXTRACTADD {{!STOPWATCHTIME}} ' ' TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/imacros/demo/v5/stopwatch.htm TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/imacros/demo/v5/f2/automatic-data-entry.asp TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:WebDataEntry ATTR=NAME:FNAME CONTENT=Tom TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:WebDataEntry ATTR=NAME:LNAME CONTENT=Tester 'Measure server reaction on submit STOPWATCH ID=SubmitData TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:WebDataEntry ATTR=NAME:SendButton&&VALUE:Click<SP>to<SP>submit<SP>data STOPWATCH ID=SubmitData 'Add this value to EXTRACT, to return it to Scripting Interface SET !EXTRACTADD {{!STOPWATCHTIME}} 'Measure time for secure Online store to open 'go to store TAG POS=1 TYPE=A ATTR=TXT:Buy 'open store => start timer TAG POS=1 TYPE=IMG ATTR=TXT:<IMG<SP>height=15<SP>alt="Buy<SP>Now"<SP>src="../shared/images/BuyNow.gif"<SP>width=29<SP>align=absMiddle<SP>vspace=8<SP>border=0> STOPWATCH ID=Store1 'Add this value to EXTRACT, to return it to Scripting Interface SET !EXTRACTADD {{!STOPWATCHTIME}} ' 'Measure time for second page 'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:order ATTR=NAME:heardabout CONTENT=Internet<SP>Macros<SP>Test 'Measure time for second page STOPWATCH ID=Store2 TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:order ATTR=NAME:ORDER_PRODUCT_NOW&&VALUE:Order<SP>Now STOPWATCH ID=Store2 'Add this value to EXTRACT, to return it to Scripting Interface SET !EXTRACTADD {{!STOPWATCHTIME}} ' TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:order ATTR=NAME:FNAME CONTENT=Stopwatch<SP>Test<SP>completed TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:order ATTR=NAME:LNAME CONTENT=See<SP>demo-stopwatch.csv<SP>for<SP>results STOPWATCH ID=total 'Add this value to EXTRACT, to return it to Scripting Interface SET !EXTRACTADD {{!STOPWATCHTIME}}
