Performance testing of an AJAX web application

For my current assignment, I was asked to test the performance of an AJAX-based web application, which was quite interesting. The customer connects different local authorities, so they use the same solution for their services and operations. Hosting and development are done by two different parties and they blame each other for the (bad) performance of the web application. The customer hired Polteq as an independent party to measure server response times as well as client-side rendering times.

Server response measurement
Jmeter was the tool of choice to simulate all the requests towards the server and measure their response times. Besides the obvious issue of JMeter not rendering JavaScript, the tricky part was that the server responded differently, 6 out of 10 times for the same request. This was solved by implementing Jmeter’s ‘logic if’ controllers. The next thing was making sure that all the relevant request headers and request parameters were present, inherited and reused. You can easily record all requests and responses with Fiddler 2 proxy.

capture-all-http-traffic-300x210A requirement for this project was to make it as maintainable and transferable as possible since the client is not too technical. This can be achieved by implementing ‘CSV data set config’ and ‘HTTP requests defaults’ elements in Jmeter.

One of the most important things of a performance test is the reporting facility. I was suggested by Martijn de Vrieze to use jmeter-plugins, with which we can easily generate sophisticated reports. Jmeter-plugins can easily create the following reports: response times vs. threads, response times over time, response latencies over time and transactions per second.

Client-side rendering measurement
MavenTestNG and Selenium WebDriver were the tools of choice to measure the client-side rendering times. I built a command line tool which executes testscripts based on given command line arguments (browser, testscript, runs). The tool executes the test scenario in the browser and stores some measurements while running the scenario. Based on the measurements a graph is created after execution.

The fun thing was that I could put the server under load by the Jmeter scripts and then measure the client-side impact with my WebDriver tool. First testresults showed a badly performing system and a lot of 404’s.

I will put the censored client-side measurement code on my public github after finishing this project.

Share This: