How to ensure a successful load testing program
Drawing on input from customers and partners, we’ve put together a list of best practices that will help you make a quick start on the road to a successful load testing program.
1. Recording a script
- First, identify the most common workflows in the application you’re testing. For an existing application, you figure this out by checking server logs and analytics which will reveal the most frequent scenarios.
- When you are recording, make sure that you test the application in a production-like environment, including factors like SSL, SSO, load balancing and firewalls. This is essential for simulating accurate end-to-end behavior.
- Record scripts from all of the most common user environments including different browsers and mobile devices.
2. Enhancing a script with correlation and validation
- Locate and replace all of the dynamic values in the recorded script, such as session-id and security tokens. If these values aren’t regenerated during test execution, most systems will not operate properly. This process is called Correlation and WebLOAD will help you to do it automatically.
- Make sure you stress the application’s back-end – and not just the cache servers – by replacing static values with parameters that will be automatically defined at run time.
- Add validation logic to the script to make sure that the results you get under load are consistent. You can use existing logical building blocks from WebLOAD, or create custom validation logic which you can save and re-use.
3. Running the load test
- Create realistic runtime scenarios that take into account the test scripts, the number of users, browser types, network limitations and schedule.
- Define the SLA or set of criteria for a successful test.
- Avoid the temptation to extrapolate results – one server with 100 users may not run like 2 servers with 200 users. Test the equivalent of your full production stack.
4. Analyzing results
- It’s important to check all of the application parameters including the number of connections, response time, transaction times and throughput. There are many reasons why an application can break under load and the actual culprit is not always easy to predict.
- Analyze server side statistics side-by-side with client side statistics and look for any discrepancies that might indicate a problem.
- Validate results against known industry rules to quickly detect possible bottlenecks.