Load Testing AJAX in LoadStorm – LoadStorm

Load testing tools can apply large volumes of virtual users against a web application. In its simplest form, LoadStorm generates traffic that goes to a site, searches the home page HTML for links, randomly chooses one and activates that link. The tool carries out a series of these HTTP requests for as many simulated users as the tester requests.

That simple load testing scenario produces results with KPIs such as error rates and response times that the tester can analyze. However when AJAX enters the equation, load testing gets a bit trickier.


First, a couple of quick definitions. Javascript is the browser script language, and AJAX is a technology typically utilizing Javascript. The purpose of AJAX is to enable “richer” applications than traditional html. It does this by using asynchronous coding in the browser for visual effects and background calls to the server which might be triggered by the user or might happen periodically.

The background server calls can then refresh the data on the page without a full page refresh. The acronym is Asynchronous Javascript And Xml, but that has really been dropped over the past few years because it does not necessarily use Javascript or XML. Javascript is still by far the most common language, but Flash and Silverlight are contenders with their languages. XML is still common as a response, but there are other typical responses that are also frequently used including fragments of HTML, JSON, YAML, CSV and other text formats. In some cases binary responses are also used, although this is rare except with images.

Some AJAX tutorials and helpful articles:


The basic premise of how our load testing tool works is that we emulate what the browser does in terms of sending requests to the server and checking how the server responds. What gets complicated is emulating what the browser does with the user. Some examples would be mouseover events, form input assistance, and dashboard graph refreshes. HTTP/HTTPS is a very simple protocol, but the addition of AJAX creates dimensions of complexity to the processing because of the increased interaction with the server.

Most modern web apps are really just an advancement of client/server technology. Instead of having a Windows or Java app as the client, we are using the browser as sort of an interpreter and presentation layer display for a client app. You can think of the HTML pages and their Javascript as the actual client side of the application.


What happens inside the client application when we use AJAX is that the Javascript sends an HTTP request to the server and then does something with the response. At this stage, we aren’t really trying to run the client application, we are just trying to emulate what it sends as HTTP traffic to the server. So, we are able to do a lot of what AJAX does in terms of submitting HTTP requests.

For a concrete example, our charts rely on AJAX technology. When you request a page with a chart, the HTML page loads (HTTP request #1). In the page there is some Javascript that loads a Flash object from our server (HTTP request #2). The Flash object makes an XML request to our server for the chart data (HTTP request #3) and renders the chart. For a running load test, the XML is refreshed every 10 seconds (HTTP request #4+). We emulate each of these requests, and although they aren’t coordinated with the exact time intervals, under load they look to the server like just a bunch of requests. So, if you get the approximate proportions of requests right, you have made a valid load test.

The LoadStorm load generator will actually run Javascript. We have this turned off right now because we want to reduce the number of moving parts at this stage. We are probably a month away from turning it on because it will require a good bit of user feedback in building scenarios and such that will take some time. We anticipate some problems with this, since it is basically providing a programming language to users and it will behave differently from what the browsers do in some cases. However, we have come a long way in technology standardization, thus there are many fewer issues with differences among browsers than the old days of LearnCentrix v1.0. We released that web app in 2000.

AJAX Greek hero

Similar Posts