Stress Testing

Stress (or capacity) testing is used determine the limits of capacity of a system under heavy load.

Stress testing, is typically when you set up a worst case scenario and increase the load till the system breaks or non-functional requirements are violated. The goal is to determine the system’s capacity and to find potential bottlenecks.

How to

To determine the system’s capacity you have to steadily increase the load. The smaller the steps the more accurate are the system’s limits. In the test case definition you can use different arrival phases to increase the load.

Example

In the following example 4 arrival phases are defined, each with a duration of 5 minutes. The load increases at a ratio of 100% in each step.

definition.setTarget("testapp.loadtest.party");

definition.setArrivalPhases([
  { duration: 5 * 60, rate: 5, },  // 5 minutes,  5 new clients per second
  { duration: 5 * 60, rate: 10, }, // 5 minutes, 10 new clients per second
  { duration: 5 * 60, rate: 20, }, // 5 minutes, 20 new clients per second
  { duration: 5 * 60, rate: 40, }, // 5 minutes, 40 new clients per second
]);

definition.session("stress test", function(session) {
 // ...
});
Last modified May 25, 2022