Load Testing with JMeter

Mike Danilchyk
4 min readMar 18, 2021

Do you perform load testing? How often? In most cases, the problem is the client doesn’t understand what load testing is for, what problems it helps to avoid and how to use its results in order to benefit the business development.

Why do you need load testing?

Load testing allows:

  1. To estimate the speed of the system
  2. Define stability criteria
  3. Evaluate ways and possibilities of scaling

Load testing gives predictions, not only describes the current level.

To be precise in terminology, the general concept is performance testing. And it is already divided into the following types that we use in our work:

  • Load testing. Usually it is a peak load according to logs or statistics of visits from the site. It is also often practice to select the load 70–80% of the maximum value detected after stress-testing.
  • Stress-testing. For this type the load increases in tens, hundreds and thousands of times. The main task is to determine the maximum possible value of the load. It shows how much performance will change in the same pattern of behavior.
  • Fault tolerance testing. Such testing shows what is often not visible in load testing. The system performance is tested under load for an extended period of time. An example of a load test is a normal 8 hour load test + peak loads, above or equal to stress testing. It checks how the site will behave when the load is increased for a short period of time:
  • Stability testing. Gives an indication of whether the system is operating reliably enough over an extended period of time. The stability test lasts several days (usually 5–7 days) and the load is selected as for the load tests.
  • Volume testing. The testers determine how the system will behave under maximum volume loads. Maximum samples are used, maximally long sessions are held. Basically, the case is used in the following way, when the data volume is 1*x, load and stress-tests are performed, then the volume increases for example n*x and at least one stress-test is performed. Based on the data we get a ratio how much data volume has affected the performance and how many times.
  • Scalability testing. It is similar to load testing, but performance is increased by adding new elements. Adding elements can be horizontal and vertical. Basically the case is used as follows: at capacities of servers 1*x loading and stress-tests are carried out, further performance n*x is scaled and at least a stress-test is carried out. Then we get the ratio of how the increase in the elements affected the performance and how many times.

Of the many load testing tools the Lansoft team favors JMeter.

Now sit back and we’ll figure out “why”?

APACHE JMETER is a fairly common free load testing tool. You can configure this application to simulate the number of users and threads, thereby measuring performance. What’s more, you can get an average result by setting several repetitions with loops. The test results are displayed both graphically and statistically.

Among the pluses we can distinguish:

  1. Support for HTTP, SOAP, LDAP, JDBC, JMS, and FTP
  2. Activated in different browsers, because it belongs to Java products
  3. You can write your test cases.
  4. Integrates with Selenium and Bean Shell to perform auto tests
  5. Logically simple interface

The results themselves can be parsed either by the built-in JMeter plug-ins or by using third-party resources such as Grafana.

JMeter Plug-ins

Grafana

You can also use monitors from blazemeter

Not without the minus JMeter, too:

  1. HTTPS recording function is not supported.
  2. There are no advanced features in the report writing process
  3. Not intercepted by AJAX

In conclusion, we can say that there is nothing impossible in conducting stress testing to improve the quality of development and business. And JMeter can be a valuable helper in improving software configuration and performance.

Properly organized load testing should always be carried out, otherwise the risk of getting into major operational troubles increases. And to eliminate such troubles will at best take several days.

--

--

Mike Danilchyk

Co-Founder & CTO — Lansoft.dev | CTO — Web3soft | Blockchain, Crypto and NFT Expert