Load testing is one of the most difficult types of software testing. And the tools for such checks are not so great. Why is it so?
If we try to answer this question, all the difficulties come to 3 things:
- Most load testing tools can support only the simplest loads. And even programs with broad capacities still don’t have all the necessary options to simulate effectively the real usage of software.
- The most difficult thing is to create a test with a simulation of real product usage, even if we use tools that have all the needed functions.
- Maintaining the test is also an extremely complex thing, and the load testing tools used here cannot provide significant support.
Now, we can look at each moment in detail and analyze which of these degrees of complexity we can get rid of.
Real User Simulation
Undoubtedly, it’s very important but everything depends on the specific situation on each particular project. In this case, we’re talking about a user of a specific service. If it’s a monolith, this is basically all the users. But in the case of microservice, the other services may be users here!
Before you start working on load tests, it’s better to wonder: when should/shouldn’t one simulate users? The second part of the question is relevant when QA knows the all the testing points are independent in performance, there’re no requests to monitor the current software state, and the order of the requests doesn’t influence performance.
These are quite significant assumptions and it will be hard to be confident about them without testing their independence. Hence, we are back to write a performance test, one way or another.
Most likely, the best we can do here is at the stage of a system design, not at the software testing stage. If we try to make API simpler, we’ll get less surface of web product to test.
If we create a system with independent parts, it will be easier to test them separately not all together. Additionally, you can use the simplest tools for load tests.
Creating and Maintaining Tests Are Complex Tasks
It is hard to develop tests since you have to remember a few things: you should see what the current flow of API usage is, and create a simulation of this usage.
To understand the flow, you have to understand how other systems work (except for the one under test). And since your system is unlikely analyzed in the documentation, there won’t be a clear analysis of what and when should be called.
Sometimes, you need to analyze logs until you understand what the real scheme of usage is.
After that, you create a simulation. This isn’t a trivial task since you need to manage a state of many actors representing users of your API.
And now, it’s time to create integration tests for this.
There is a lot of research on how to effectively simplify some tasks on load testing. For example, you can analyze what is needed for initial tests, how to detect regressions, and so on.
Is It Necessary to Cover Everything With Load Tests?
All load tests contain a lot of difficulties that can be handled only by using a variety of different tools. This means that the solution is as follows: create a minimum number of tests and don’t hope too much that they will be able to answer all the questions about the current software performance.
To get all the information about system performance, you can try one of the available options:
- Analysis. It is enough to spend several hours to understand the basic calculations of parameters and maximum limits in the performance of the system under test. If you see unknown variables or data during analysis, you can check them right away.
- Deployment of features. If you can slowly roll out features to all users, you may not even need load testing! You can add measure performance experimentally and test whether it is enough.
- Traffic repeat. This will definitely not help with new features, but it will allow you to correctly understand the critical points of the software for already created features. You can take traffic detected previously and run it on an ongoing basis by analyzing the state of system performance.
In Conclusion
When developing any software, one should remember that it will grow over time and, therefore, it has to withstand more loads. For these exact purposes, we need load tests.
If it is a simple product, it will be easier to perform these checks. But if we have more complex software, we need to use another testing methodology and tools. As a rule, a lot of difficulties and various problems appear at this stage. And if we want to get a really good product, we have to search for an effective and nontrivial approach.
Leave A Comment