Performance testing plays an important role in ensuring the quality of modern systems. It allows you to evaluate how quickly, stably and efficiently the system operates under different loads, and helps to identify potential bottlenecks before entering the market. Today, classic performance testing is complemented by a new approach — continuous performance testing, in which checks become not a one-time procedure, but part of a continuous development process. In this article, we will consider the features of performance testing and analyze what continuous performance testing is.
What Is Performance Testing and How Is It Performed?
Performance testing is testing that is performed to ensure uninterrupted operation and reduce the cost of ownership of software at all stages of the solution life cycle.
Let’s consider the sequence in which this check is performed and what features are characteristic of each of the main stages:
- system analysis and selection of requirements;
- strategy preparation;
- load generator setup;
- monitoring servers and load generator;
- preparation of test data;
- development of load scripts;
- preliminary test runs;
- testing;
- analysis of results and report preparation.
Stage 1 — System Analysis and Requirements Selection
It is important that the system is completed before testing. If the development process is not completed, the data obtained will reflect invalid results.
System analysis includes studying its properties, features and operating mode. With its help, engineers:
- reproduce the most objective user behavior patterns and load profile;
- determine the required amount of test data;
- identify potential software bottlenecks;
- configure system monitoring methods.
Requirements are the criteria that the system meets from a technical point of view. The main emphasis is on defining the success criteria for the tests carried out, which are contained in the SLA.
The requirements selected at the initial stage will be compared with the results obtained in order to evaluate the behavior of the software product both as a whole and in individual blocks, and to find bottlenecks.
Stage 2 — Strategy Preparation
The strategy is developed based on a detailed software analysis and describes an expanded approach to performance testing.
The analysis includes all collected information about the system, testing objectives, software requirements, testbed configuration, monitoring, user behavior scenarios, load profile and model, performance testing tools, planned test runs, and the type of results provided.
Testbed Configuration
The results of load testing are affected by factors such as testbed configuration, network load, database content, etc.
Therefore, to obtain reliable results, performance tests are conducted on a separate environment with parameters and configuration that are as close as possible to the characteristics of a real system.
Development of a Load Profile and Model
During performance testing, statistics are collected on software usage, which is needed to create a load profile — a user behavior model.
Selecting a Tool for Load Testing
Using load testing tools allows you to record the process of data exchange between the server and the browser at the level of HTTP(S), WS, TCP, etc. and reproduce this process taking into account the logic of correlation of dynamic parameters.
Launching developed scripts in several threads helps to generate the required load on the system.
Load testing of performance is carried out using: Apache JMeter, HP Loadrunner, Microsoft Visual Studio, TSUNG.
Stage 3 — Configuring the Load Generator
To conduct high-quality performance testing, the tool is installed on the load generator — a virtual or physical machine located as close as possible to the application server(s). This reduces distortions in load delivery caused by network delays. To create a large volume of load, the resources of one machine may not be enough, so distributed load testing is performed.
Stage 4 — Monitoring Servers and the Load Generator
The metrics identified in the first stage are used to evaluate the software performance parameters and identify those areas of the application that create bottlenecks.
The information obtained from monitoring all servers and system resources is used to analyze the performance testing results.
Stage 5 — Preparing Test Data
There is no universal approach to such preparation. Often, for the solution to work correctly, it is necessary to create data in a volume sufficient for developing scripts and conducting tests.
As a rule, a suitable method is established at the stage of analyzing software features, when the types of test data and their structure are discussed together with the development side.
We will highlight 4 methods of preparing data:
- Code
- SQL queries
- API queries
- Interface
Stage 6 — Developing Load Scripts
Performance testing scripts are created using the selected tool. The script development process consists of three steps:
- Studying scripts
- Creating test cases
- Debugging scripts
Stage 7 — Preliminary Test Runs
Preliminary test runs are needed to check the correct operation of the prepared load scripts, as well as to find the optimal load model for the system. They allow you to determine the utilization of the resources of the load generator(s) and understand whether the included capacity of the generator(s) is sufficient to conduct full-fledged tests.
Tests should be run with different load models. After each run, it is necessary to analyze the results and obtain the optimal load that the solution can withstand.
Stage 8 — Testing
Performance testing usually includes the following tests:
- Stress testing
- Load testing
- Stability testing
- Volume testing
- Scalability testing
- Configuration testing, etc.
Stage 9 — Analysis of Results and Report Preparation
Based on the previous stages, a document is created that describes not only the results of the tests performed, but also the progress of each of them.
Continuous Performance Testing: Why Do We Need It?
Nowadays, when developing new products, more and more attention is paid to continuous performance tests. Unlike the traditional approach, when load tests are performed only at the final stages of product development, this method is integrated directly into the CI/CD pipeline and accompanies the system at every stage of its development. This approach allows the team to identify bottlenecks in time, prevent regressions, and control the impact of new features or infrastructure changes on the speed and stability of the system. As a result, performance ceases to be a “final test” and turns into a constant criterion for the quality of the product.
Conclusion
Performance tests and continuous performance tests are focused on solving the same problem — ensuring high performance and stability of systems. However, their approach is different. The first approach provides a snapshot of the system state at a specific moment, the second allows you to turn performance monitoring into an ongoing process. If you are looking for experts who will help you implement modern performance testing practices and customize them for your product, contact PFLB.