Load Testing a Website

When we are building a complex site such as a social networking site often we would like to know how many consecutive users the system we have built can support. What we mean to say by “support” is basically the amount of time it takes for server to respond to a requested page reasonably fast manner. The wait time is usually indicated in milliseconds (1 second = 1000 milliseconds) . The tolerance of every web user is different. But clearly in the world of high speed internet we we would like to know that when we click on a link we get a response from the site at least within the first 1000 ms. Waiting more than 1000 ms ‘s without seeing anything on the screen usually pushes people to try to either refresh their screen or worst to leave your site.

Load testing is usually done before going live in order to get prepared for a scenario where many people try to make queries on your site at the same time. The findings of the load testing could indicate that one needs to use some advanced mechanisms to improve their site performance (i.e.  caching, database pooling, compression,etc.)

Here are the most common ways to do load testing:

Apache AB tool is perhaps the easiest tool to get some useful metrics .

Here is an example:  ab -n 100 -c 30 http://www.yourtesturl.com/projects.php

JMETER is a java based tool that you could use to do really complex tests. It has the capability to show you a graph of the results.

Online Testing Tools: In our tests the most useful free tool we have found  online was “Load Impact

Another site that we thought was really impresive and promising was

Browser Mobster” using this tool one can record a test scenario using

Selenium“  run this scenario consequently on many different computers/browsers

to provide you with a realistic report.