1. Test from the end user’s perspective
The first objective of a successful load test is to focus on the most important metric of the test: the end user’s experience with the application. Remember that an application server, a network, or a database might perform well under heavy load, but your tests are not conclusive if they don’t replicate real world transactions executed the same way the end users will.
2. Set test objectives
Define the test objectives for response time and stability. Identify what is acceptable and what is not.
3. Identify test scenarios
Scenarios are sequences of actions the end users perform when interacting with the application. Your test should include the scenarios for which you have set performance goals or which have significant performance impact. These scenarios should replicate business activities performed by the end user.
Example: End user searching for an airline flight, reserving a seat, then buying the ticket.
4. Set the load distribution
In the real world, not all the users who searched for a flight will select one and purchase a ticket. Therefore, a realistic load distribution will be something like:
At any given time, you may have 70% of end users searching for a flight, 20% reserving a seat, and 10% purchasing a ticket. Based on this we can derive the number of virtual users executing each scenario. For 1000 virtual users: 700 will be searching flights of different origins and destinations; 200 will perform the reservation process; 100 will purchase a ticket.
5. Create test cases
The test cases lay out the steps to be performed with the application to determine whether it is working, along with an expected result for each step. They are based on the scenarios and user profiles.
Each test case/step will be marked as PASSED or FAILED after the test run.
6. Choose a load testing tool
The success of your load test can hinge on your choice of testing tool. The right tool will facilitate the steps we’ve laid out to this point. Depending on your budget and how you intend to use the tool, you might want purchase, lease or use a SaaS type tool.
Word of warning… make sure to try before you buy!
7. Prepare the load environment
Identify the hardware and install the load test software. Ensure you have the right number of servers and sufficient bandwidth to generate the load.
8. Start with small number of users then increase incrementally
This allows adjusting the wait time to synchronize the execution of the scenarios and will help you find the break points easily.
9. Run the test
Perform multiple runs with different numbers of users to analyze the way the application behaves under different loads.
10. Analyze the results.
Make sure the objectives have been achieved. Compare the results of each run and determine how the application is behaving under different loads.