DEV Community

Cover image for Understanding Performance Testing: A Guide to Testing System Capacity
Will Drygla
Will Drygla

Posted on

Understanding Performance Testing: A Guide to Testing System Capacity

Helloo, today, I decided to talk a little bit about performance tests. In the last few days I have been working with performance tests, and I’d like to share how I approach these tests to ensure system performance.

While it may be tempting to overload the system just to see how it handles failure, it is crucial to gather meaningful metrics during testing.

Performance testing can vary significantly depending on the specific goals and expectations set by the company. In this article, I’ll focus on a few scenarios aimed at evaluating the system’s capacity.

I start identifying the baseNumberOfUsers, let’s say we are testing a system of a bank agency, that uses the same system for all users, let’s divide the users into three types: Operators, ATM users and APP users, so, imagine that the agency has 10 ATM’s and 30 Operators, with a average number of users in the app of 50.

We could say that the baseNumberOfAtmUsers is 1, baseNumberOfOperators is 3, and baseNumberOfAppUsers is 5.

And I use a variable to set the scalability, which I’ll call scalabilityMultiplier. The scalabilityMultiplier allows me to scale the number of users proportionally, simulating different levels of system load

For the scenarios, I am writing three for each type of user, in general, two simple and one more complex, for example, let's write the scenarios for the ATM user:

One: Withdrawing money ( 4 GET requests + 3 POST requests );
Two: Transferring money ( 4 GET requests + 3 POST requests );
Three: Performing a deposit, payment, and withdrawal ( 12 GET requests + 6 POST requests );

Image description

Now, we can test our system and take some metrics of it.

appUsers = baseNumberOfAppUsers * scalabilityMultiplier

operators = baseNumberOfOperators * scalabilityMultiplier

atmUsers= baseNumberOfAtmUsers * scalabilityMultiplier

We begin by testing with one-third of the total users and gradually ramp up to the maximum.

Let’s get two metrics I use:

percentageOfSuccess
avgReqDuration

With this, we could test the limits, checking both, like, even if the percentageOfSuccess remains above 99.9%, a high avgReqDuration indicates the system is reaching its performance limits at that particular user load.

Image description

Top comments (0)