What is performance testing?
Performance testing is a set of tests to determine the performance, stability, resource consumption, and other quality attributes of an application in different use cases and workloads
Performance testing of the site basically implies the following:
- Emulating user requests to the tested site at minimum, average, and maximum levels (which must be determined before performance testing begins).
This is called testing the site under working conditions, or as close to them as possible.
- Comparison of initial criteria for assessing the productivity of the site (what we wanted to achieve) with the actual performance (what we got).
The productivity criteria
It is part of the general requirements long before the application appears online.
The productivity criteria must be:
- measurable
- quantifiable
- predictable
The examples of criteria:
- When searching for profiles with photos, the server must “withstand” at least 150 simultaneous requests.
- Generation of the page with the query results does not exceed 4 seconds.
- The results of the requests are cached and given to the next user who makes a request similar to the previous one.
- The application withstands 600 active users.
What should be tested
Here are 5 basic aspects that a dedicated QA team always checks while doing performance testing:
Response time.
It is the time (measured in seconds) between the initial request to the server and its “final” response to the client in all operating modes – both in normal load mode and in overload mode.
Maximum Allowable Load
Conducted by simply increasing the load from zero to the maximum parameters.
The main question we’re trying to answer through Load testing is, “How does the response time change as the server load increases – linearly or stupidly?”
Linearly: if the response time increases in proportion to the load. That’s normal.
Stupidly: if the response time grows disproportionately to the increase in load. Then uncontrollable “slowdown” begins.
Sometimes instead of “stupidly”, they say “logarithmically.” Example: “Response time grows logarithmically!”
Clarification: load testing is part of universal performance testing.
Maximum Stress Tolerance.
It is done the same way as load testing, but without a stop when expected limits a reached. Information is obtained about how it will behave when the load exceeds the calculated limits. Doing this procedure we learn what scale the server will try to work up to, and at what point it will refuse to serve.
So the difference between Load and Stress testing is very subjective, the boundary is thin. In fact, the difference is that Load testing brings us information about the behavior of the application “within the expected range” and Stress testing brings us information about the application behavior when this “range” is crossed.
Mean Time to Failure (MTTF).
The developers swear that with 300 active users the server “will be trouble-free for an hour until the cache fills up”.
The testers begin to calculate: one hour – 300 users. So 600 users will “kill” the application in half an hour. But 1200 users will kill the server instantly!
Or no: An hour = 300 users. What if you keep the server under this load for two hours? What if it takes three hours? What if you keep the server for six hours under such an array of requests – will it crash? No? Let’s check it.
And let’s find out how long the server with the database will run “fail-safe” separately from the server with the application! Won’t the processor overheat?
In general, based on their own knowledge, the engineers assume that for a week the server will “stably” live under a peak load of 300 requests per hour. Was this predicted? Is that what they tested?
For testing web servers, MTTF may not be a very important test. If it dies – well, reboot it… But, for example, without MTTF testing on systems that will be running far away from the developers (in space), the failure could literally be tragic.
Performance tuning.
Sounds weird, but what is really meant here is the final tweaking of the performance of the server. In conjunction with the developers, testers tune and double-check server performance for the hundredth time, taking into account the changes made. Testers themselves are helpless here.
If you struggle to find a trustworthy specialist, it would be a really good idea to go for a service of a specialized performance testing company. They are guaranteed to get the work done professionally and on time. Check out https://u-tor.com/services/performance-testing.