Over a million developers have joined DZone.

Load Testing and Stress Testing

The terms load testing and stress testing are often used interchangeably. However, there is a fundamental difference between the two.

· Performance Zone

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

The terms load testing and stress testing are 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 five 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 2,000 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 acceptable criteria, then it should be fixed and the load tests should be run until the application satisfies the acceptable 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.

You might also want to check out these resources:

Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

performance ,load testing ,stress testing

Published at DZone with permission of Rohit Sharma. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}