Load Testing and Stress Testing
The terms Load Testing and Stress Testing is often used interchangeably. However, there is a fundamental difference between the two.
Let’s assume that we have an application that at peak times is subjected to a load of 2000 virtual users.
Let’s also assume that a response time of 5 seconds is considered acceptable.
Load Testing attempts to measure how well the application performs at a given load. In the case described above, we would attempt to load the application with 2000 virtual users and attempt to measure the mean application response time and find out if it meets our criteria.
The load should be as representative as possible of the actual real world situations. This means that the data should be parameterized and different virtual user ramp up scenarios should be modeled.
If the application fails to meet the acceptance criteria, then it should be fixed and the load tests should be run until the application satisfies the acceptance criteria.
Stress Testing attempts to break the system. This means taking the application out of the range of acceptable conditions.
It could involve using a much higher virtual user load than the specified limit. It could also involve giving the application insufficient RAM or configuring the database with fewer memory resources than is normal.
Under these conditions, the application will reach a breaking point. At this point, the application should degrade and finally fail gracefully.
Stress testing can be related to load testing or can involve stress parameters that may not be directly related to load testing. Stress testing is thus by definition not a subset of load testing but rather a particular form of testing that may encompass load testing.
In the application described above, stress testing could involve ramping up to a virtual user load of 6000 virtual users.
The application’s performance should degrade gracefully and if it does fail, it needs to do so gracefully.
During load testing design, it is important to establish if the testing process would also encompass stress testing.
Moreover, the criteria for stress testing should be clearly established and the development team should come to an agreement as to what should happen when the application is subjected to the specified degree of stress.