How to prepare for a stress test?
Checking operation in extreme conditions of use for the software for any malfunctions is extremely necessary, as they can lead to serious consequences, both financial and more serious like human lives.
Often, it's not possible to manually create the required load conditions, therefore, refer to:
Another case of stress testing is to test the capacity of the application, the purpose of which is to determine the safety margin of the system. With this type of testing is necessary to consider the current load of queries and transactions, as well as their expected number in the future. As a result of capacity testing, we get a lot of acceptable characteristics in accordance with its requirements in the development process.
How to prepare for a stress test?
Nowadays, with the ever-growing number of Internet users and PC users in general, we seriously face with the task of creating systems capable to work under enormous loads without visible slowdowns and failures.
Any kind of problems associated with poor performance can lead to failure of the customer to use your software, even if it suits them functionally. In this regard, a qualitative stress testing should be mandatory in order to ensure the stability of your applications.
Stress testing and performance testing are automated simulating the work of a certain number of users on any or general (shared among them) resource.
Here are the steps of stress testing:
- Stress models development (can take up to 50% of time).
- Testbed configuration.
- Script development.
- Conducting the test.
- Analysis of results.
The preparation stage (see point 1 above) consists of:
Requirements analysis: Preparing for Stress Test
In the analysis of the requirements, the focus needs to be done to identify the main criteria for the success of the tests. To do this, you will need to identify the following characteristics:
- The response time (how long it takes to open a page or obtain the expected result).
- The intensity (the number of requests per second - Qps).
- Useful resources (CPU usage, number of used memory, disk and network I/O).
- The maximum number of users (number of users determines the ability to operate the system in a given configuration).
- And also some metrics of business scenarios related to work (for example, the number of business transactions per unit of time, run-time business transactions, etc.).
These specifications will be used as base-loaded points of the application under test. All the results obtained will be compared to them for a decision on the conclusion of the test or future performance profiling.
Analysis of requirements depending on the type of project
It's necessary to consider whether the new startup project is developed or it's a profiling project in operation.
For startup projects:
For profiling projects:
Analysis of the target audience
Communicating directly with users, monitoring their activities helps us to understand more precisely how it will look like to work with the software, which parts of the application are the most critical and require special attention. If the system under test is already in operation, user scenarios and distributed queries throughout the day can be obtained analyzing logs from the application server.
As a result, we get:
Determination of base load profile
Highlighted at the previous step, user groups, business scenarios, system requirements can start to create the load profile - a set of operations and the intensity of their performance for each user group. Knowing the number of users in each group, we will have to distribute them to perform the required operations, while maintaining the necessary intensity.
Development of stress models
Depending on the type of test conducted and the objectives pursued by them, we have to develop different load patterns.
It can be different:
The easiest way to carry out the changes by varying the parameters in the base profile and load tool for performance testing (ex, HP LoadRunner, Jmeter).
How to prepare for stress test: Stress Testing ModelBy increasing the intensity of the operations above the peak (the maximum allowed) values or increasing the number of users until the load becomes greater than the maximum permissible value, we check that the system is operable under stress. Furthermore, lowering the load to the average values, check (the system's ability to regenerate), that the system is back to normal (basic load characteristics do not exceed the basic).
Strict adherence to all of the above instructions to will allow us to: