How to Test a AJAX Web Application

Visual Studio Team System have a option to create a Webtest based on your activities in browser. The problem is that this logs only POST and GET and no background activity generated by JScript.

For that problem HTTPFiddler can generate from one or more traced sessions a Webtest file. All you have to do is to mark the requests in fiddler and save it as web test

From this Webtest you can create a load test to verify that your application have the needed performance. At that point I run into the next problem

How to specify the typical usage of a AJAX application?

If you uses features lik autocompleextender (from ajax futures), how often is a callback to a web service made? Its lot easier to figure out a step by step procedure to finalize a order process in a online shop if you only have HTML documents delivered.

Also the easiest case, a updatepanel with a few controls inside, gives the user more options to navigate through the form. So I expect several more postbacks from clients as with a classic ASP.NET application. Means you need more Servers and NLB to host a AJAX enabled web application. On the other side I expect less traffic.

the Test

I tried to figure out how effective AJAX postbacks compared to classic ASP.NET postacks are. Excuse that, but my scenario uses a page with 2 buttons displaying the actual time. One is in updatepanel and one button is outside. The test clicks in one run on the inside and in the second run on the outside button. My expectation is that a AJAX user loads the page and clicks ten times the button ( what a nonsense, but I need that ).

The results shows no significant difference in various counters like requests/second. So my feeling (not shure at the moment) is that reendering of a AJAX page needs the same processor load as the same classic page.

Published Wednesday, January 10, 2007 9:08 PM by preishuber
Filed under: ,

Comments

# re: How to Test a AJAX Web Application

Thursday, January 11, 2007 3:22 AM by Michael Schwarz

Hi Hannes,

nice to see this post after our discussion yesterday. In your test scenario you have to compare everything including slow connections, cpu usage on client and web server, memory usage,... If you run a web test on your local PC or a local web server you will not see a real difference.

I have created a small tool that can be used in combination with a http proxy to create real user scenarios. You can simply put this on your web server and it will monitor every request from all or specific IP addresses. The same tool can be used to import Fiddler session logs to build VS.NET web test.

Michael

# re: How to Test a AJAX Web Application

Monday, August 04, 2008 7:14 AM by Naseem

Hi,

Can anyone provide me the various scenarios for testing the AJAX implementation on a mobile based website. Or can anyone guide me the various functionalities which can be implemented using AJAX in a mobile based web application

Leave a Comment

(required) 
(required) 
(optional)
(required)