Apache JMeter vs Gatling Tool- Load Testing Part 2

Apache JMeter vs Gatling Tool- Load Testing Part 2

2020 / 1 / 27

Jmeter, Gatling Tool, SOAP/ REST Web Services

Apache JMeter vs Gatling Tool- Load Testing Part 2

In the last blog post, we have seen that there are 10 categories on the basis of which we have attempted to drive a comparison between Apache JMeter and the Gatling tool.

  1. Project History
  2. Documentation
  3. Development
  4. Setup
  5. Built-in Facilities
  6. Flexibility
  7. Scripting
  8. Performances
  9. Test Execution
  10. Cloud Load Testing

We have already covered the first 5 categories in the previous blog post. We will discuss the rest 5 categories and will attempt to arrive at a conclusion.

1. Flexibility: We will see the list of features of the 2 tools. Which protocols they support.

JMeter's Features:

JMeter supports a variety of protocols:

  2. SOAP/ REST Web Services
  3. FTP
  4. JDBC
  5. LDAP
  6. SMTP(S), POP3(S), IMAP(S)
  7. TCP
  8. GUI Scripting

Gatling Features:

Now we will see the list of protocols that Gatling support:

  2. JMS Load testing
  3. REST APIs
  4. HTML Reporting

There is also a small list of protocols that Gatling do not support, but that are supported

by JMeter:

  1. SOAP Web Services
  2. FTP
  3. JDBC
  4. TCP
  5. GUI Scripting

So, you can clearly see JMeter has more set of features, thus more flexibility in load

testing than Gatling. JMeter is a winner in this comparison.

2. Scripting: One of the biggest differences among both the tools is the way they save the file.


Jmeter saves the project as an XML file with jmx extension. JMX is more verbose than

the Gatling Scala Simulation. JMeter has GUI to open and display the jmx file. Do not attempt to modify the JMX file yourself, as these files are not sustainable.


In Gatling, projects are saved as simulations. Gatling simulations can be edited and modified directly. Gatling has no GUI, this means you have to write the code to modify the simulations. Scala IDE can be used to modify Gatling Simulations.

JMeter is user-friendly due to the GUI part but you can not edit the JMX file. On the other hand, Gatling has no GUI, thus you have to write code to do the modification, but it is still possible to modify simulations. It is entirely your choice to decide which tool to use if we decide on the basis of Scripting.

3. Performances: We will discuss the paradigms used by 2 tools that affect the performance of the tools.


JMeter uses One Thread= One User Paradigm. It means the simulated user is equal to one thread where Thread.sleep() is used to simulate Wait time.


Gatling, on the other hand, uses much more advanced technology, Akka. Akka allows for full asynchronous computing. It is a distributed framework based on the Actor Model which can simulate multiple virtual users with a Single Thread.

Here, Gatling is surely ahead of JMeter, but one of the major limitations is Network Bandwidth bottleneck, where simulating multiple virtual users on a single machine reduces the network bandwidth.

Choosing among JMeter or Gatling is completely your choice. You simply need to list your project requirements, which will help you to make a more wise decision.

We have tried to help you to get an insight into each tool feature that will help you to at least decide which tool is more appropriate as per your requirements.

4. Test Execution:

JMeter Test Execution:

JMeter can be executed in 3 different modes:

   a. GUI Mode
   b. Server Mode
   c. Command-line Mode

a. GUI Mode: **If you are using Windows, navigate to the bin folder in the installed directory. You will find a Windows Batch File under the name jmeter.bat**


Just execute this Batch File and You will see the Apache JMeter Windows.



b. Server Mode: **Server Mode is designed for Distributed Testing Environment** like a Client-Server Model, where Apache JMeter will run in Server Mode on Server Computer and in GUI Mode on Client Computer.

To start JMeter in Server Mode, just execute the Windows Batch File jmeter-server.bat in the bin directory.


c. Command Line Mode: Running JMeter in GUI Mode consumes a lot of computer memory. This is why it is not advisable to run JMeter in GUI Mode for Load Testing. For saving resources, you may choose to execute JMeter in Command Line Mode.

  1. Open the command prompt.
  2. Navigate to the bin folder in the Apache JMeter directory.
  3. Execute the following command.

          jmeter -n -t SampleTest.jmx -l testlog.jtl


-n: Specifies JMeter to run in Non-GUI Mode.

-t: Specifies the name of JMX File containing the test plan.

-l: Specifies the name of the JTL file to log test results.

Other than these options, there are so many parameters available. You can find

the list of the parameter fromApacheJMeter- User's Manual.

JMeter offers the user an option to save the JTL file while executing the test in Command-line mode and view the graphical view of results using the saved JTL file.

There are a variety of listener interfaces available in GUI Mode.

Gatling Tool Test Execution:

Gatling can be executed in 1 mode:

  1. Command Line Mode: Executing Gatling tool in command-line mode requires you to follow these steps:
  2. Open the command prompt.
  3. Navigate to the folder where the gatling.bat file is located. In most cases, it is in bin folder.
  4. Execute gatling.bat file.
  5. After few seconds, you will be able to see the list of simulations. Select the one that you want to execute.
  6. Select the desired simulation number and press Enter.
  7. After selecting the simulation number, you will be asked to write a description. Enter the description and press enter.
  8. You will be able to see the test scenario.

So, it does not support the Graphical view of the results. There is a lack of UI Result Listeners.

We can say, that in a way JMeter is a clear winner here, as it supports a variety of

modes. User can decide as per the requirements and availability of resources.

5. Cloud Load Testing:

JMeter Cloud: There are many companies like FloodIO, RedLine 13, HP Storm Runner, etc that support cloud load testing for JMeter.All of them provide a facility to scale load tests in the Cloud and provides basic reporting.

Gatling Cloud: Companies mentioned above also support the Gatling Tool. The Exception to this is HP Storm Runner. Gatling Frontline is a defacto standard for running Gatling tests in the cloud.

We can say, JMeter is a winner here as Apache JMeter is supported by majority of companies in the market for load testing in the cloud.

After such a thorough and detailed comparison, I think it is pretty clear that each tool has its own pros and cons. It simply depends upon your project resources and requirements, which tool to use.

You might also like