Page 1 of 1

Load and Performance testing of AJAX pages

Posted: Wed Dec 03, 2008 3:13 pm
by Tech Support
Problem: We have numerous AJAX-heavy pages on our site. We'd like to have imacros record the load times of these pages (including the AJAX). It appears that imacros only records the load times of the main site (JSPs), and not the AJAX which begins once the page load is complete.

ajax performance test.png
AJAX events can not be detected by the standard browser "Document Complete" signal.
ajax performance test.png (54.44 KIB) Viewed 9957 times


Solution:
Use the IMAGESEARCH command to wait for the AJAX function to show the result;

imagesearch ajax.png
AJAX function is complete
imagesearch ajax.png (84.58 KIB) Viewed 9957 times


image search input.png
A small part of the image is sufficient as input (the smaller the input, the faster the image search).
image search input.png (1.41 KIB) Viewed 9948 times


So a simple AJAX performance test macro will look like this:
'Start reponse time measurement
'Measure total macro runtime
STOPWATCH ID=Total
'Measure load time for page
STOPWATCH ID=PageWithAJAX
STOPWATCH ID=PageHTMLonly
URL GOTO=http://www.shutterfly.com/lightbox/view.sfly?fid=5f2cd61b5ac6aaac0031ecd658bfd733
STOPWATCH ID=PageHTMLonly
IMAGESEARCH IMAGE=square.bmp CONFIDENCE=100
STOPWATCH ID=PageWithAJAX
STOPWATCH ID=Total


Related forum posts: How to handle AJAX

Re: Load and Performance testing of AJAX pages

Posted: Fri Jan 16, 2009 2:46 pm
by Tech Support
:arrow: Please also see the Wiki FAQ: Testing AJAX websites

Re: Load and Performance testing of AJAX pages

Posted: Thu Jul 30, 2009 8:36 am
by kaylag
I am using a website that has AJAX and i cannot use the Imagesearch as i am looking to double click to make the function work...

How would i go about double click on an AJAX page?

Thanks