A guide to load testing your web site or browser based applications. In this post we detail 5 key steps to ensuring your web site is ready for ‘prime time’.

1. Identify the main application functions

Your first task is to identify the core user journeys/tasks in the application you wish to load test. If you are testing an existing application you can find this information is various places: application logs, web server logs, database audit tables and analytics tools like NetInsight, Coremetrics or Google Analytics. You will also need to gather useful metrics about transactions during a peak period, e.g. the number of sales orders created during a peak hour. This will help to inform the design of the load test scenario and will form part of the pass/fail criteria.

2. Record your scripts

Once you have identified your core journeys you need to record them in an automated test tool like OpenScript, part of the Oracle Application Test Suite, to produce a script. Any dynamic values, e.g. session ids, should be automatically correlated to support multiple user activity, and should be provide facilities to do custom correlation if required.

3. Integrate test data and validation

Add any data required for the scripts. For example, you may need to parameterise the scripts to provide different user login details for each virtual user. To confirm that the scripts are executing as expected you can add custom validation checks to the scripts.

4. Create load test scenarios

Use the information gathered in step 1 to design the load test scenarios you wish to execute – which test scripts, think time parameters, ramp up, number of users etc. Initially execute small ‘smoke tests’ against your application to validate the scripts and check the database to confirm the expected artefacts are created in the back-end. Then move to execute the full-scale tests against your production environment.

5. Measure and analyse

Measure client-side metrics, e.g. response time, pages/sec, and server side performance metrics (CPU, memory…) during test execution. Compare these metrics against increasing user load looking for indicators of problems/bottlenecks. Repeat the load tests to confirm bottlenecks are fixed as the performance test cycle proceeds.

One important factor is that successful load testing is a collaborative exercise, and therefore requires a team of people expert in load testing (and the testing tool), the infrastructure and the application under test. This makes for an efficient and productive performance test cycle.