>
Understanding Distributed Load Testing: The Basics

There are many different types of tests that go under the umbrella term of “software testing”. Before any application is shipped, it is thoroughly tested for bugs and vulnerabilities. Testing uncovers such flaws and outlines the scope for improvement. Depending on the scale of the system & niche, appropriate tests are curated and executed.

During the development phase of the application, tests are mostly code based where the individual parts are asserted for their functionality. This often includes edge cases that are non-trivial. Such tests tell how well the components of the application couple together to fit in the bigger picture.

Although the scope of code-based tests is limited to testing the functionalities of the application, there are non-code-based tests that assert more than just the working.

In this article, let us try to understand non-functional tests, load testing in particular, their types, and their importance.

Non-functional Testing

Non-functional testing is a method of software testing used to examine a software application’s performance, usability, dependability, and other non-functional features. It is intended to test a system’s suitability according to nonfunctional criteria that functional testing doesn’t take into account.

Source

There are various tools available to carry out different non-functional testing, the most popular being JMeter by Apache. JMeter testing can be used for analyzing and measuring the performance of services.

Types of Non-functional Tests

As nonfunctional tests aim to assess the software under different scenarios, there are different tests that undertake these different scenarios.

To determine scalability, software design, and stability, performance testing yields the best result.

When it comes to testing the performance of the application under abnormal conditions, stress testing is the preferred test.

Similarly, security tests are performed to identify the security loopholes and vulnerabilities in the application.

Load Testing

During load testing, the software’s performance under normal and busy workloads is examined. This is done to identify, how much work the software can process before the performance drops.

At a first glance, it might seem that there is no fine line between load testing and performance testing, but load testing is a subset of performance testing.

There is no fixed methodology for designing a load test, but ultimately the software should be tested thoroughly under different loads.

One good way of load testing is to subject the server to heavy traffic and keep increasing it until a breakout is observed.

What is Distributed Load Testing?

Now that we know what load testing is, understanding its distributed nature is fairly simple, simply put, running a test simultaneously on numerous distinct computers is known as distributed load testing. It entails creating a lot of traffic and enables the simulation of several virtual users. Because of this, using just one computer is insufficient. In distributed load testing, numerous load generators are used to generate a large load.

Standard load testing uses a single machine to generate the load; however, to test high user demand in real-time, we would need to spread the load across multiple devices in various geolocations. Additionally, distributed testing helps replicate the behavior that is more similar to that of a physical user, thus test findings can be more realistic.

Why Should One Do Distributed Load Testing?

Simulating requests from tens of thousands of fictitious users is a common practice while running load tests. The computer executing the test must devote a lot of resources to simulating these users. In some cases, one machine is unable to produce a sufficient amount of load to adequately test the server.

In order to tackle this problem, you can develop distributed tests. To replicate the demand on the target server during these testing, many devices are used. Each computer can manage the load generation simultaneously.

You can assess how well your server handles clients from different regions if the computers generating the load are located in various locations. Moreover, it results in a more accurate test.

It is also true that not all of the end users will be accessing the server from one single computer, so incorporating distributed load testing is practical and closer to a real-life scenario.

Distributed Load Testing: Process

To implement distributed load testing, it is essential to setup an environment which consists of 3 components, that is the master, slave and the target. A master is a testing instance that controls multiple slave instances that actually send load to the target server.

Source

JMeter testing can be used for distributed load testing. Since, the master should be able to summon all the slaves, make sure that all the master and slave PCs are connected to the same subnet.

Once all the instances are on the same subnet, the next step involves assigning IPs to the slave systems. After the slaves are assigned the IPs, invoke them remotely via a test script.

After the instances are up and running, you should create a test planner. If you’re using JMeter, you might want to create a thread group, allocate threads and configuration elements as HTTP request defaults in the thread group. You can then run the distributed load test by setting the slave instances and thread pool.

The results of the load test depend on factors like configuration of master and slave system, number of concurrent requests sent & network bandwidth.

Conclusion

Distributed load testing gives important insights about the performance of the application under load & identify potential performance drawbacks which can be rectified before the release. Utilizing cloud-based solutions is always recommended when dividing the load because they can offer better resources at a lesser cost. Using local computers is expensive and could produce false-positive results due to network or system latency problems.

 

Show Comments