JMeter has been first released in 1998, so this project more than 15 years old.
It's a mature project which has released more than 20 versions. JMeter is purely written in Java,
although OpenHub shows that it also contains XML and HTML:
JMeter has more than 10.000 commits representing almost 500K lines of code. 33 people contributed to the project so far. Philippe M. is one of the biggest contributor to the project, mostly in Java. He is the founder of Ubik Load Pack, a French company offering commercial JMeter plugins.
Gatling Tool has been first released on December 20, 2011.
Gatling is a younger project, with almost 4 years old codebase. Gatling is mostly written in Scala.
Scala differs for Java by offering full support for Functional programming.
Scala has been created by a Martin Odersky, as German computer scientist.
Stéphane Landelle is the main contributor and creator of Gatling tool. More than 60 people contributed to this project.
Its size is almost 50K lines of code.
Gatling tool is open-source and released under the Apache 2.0 license.
Its development is supported by Excilys.
JMeter wins on Project History. The project is significantly older and has more contributors. Both Gatling and JMeter are maintained regularly. JMeter has a significantly bigger codebase (almost 500K lines now), which Gatling tool is much smaller (50K lines of code). Of course, Scala code is more concise than Java code.
The match between JMeter and Gatling tool ends with a draw on documentation. Both are great!
You may prefer the look of Gatling's documentation, but JMeter has recently made a great effort to refresh the look of their website.
The JMeter documentation is really great. Every feature of the tool is detailed with every possible setting.
They truly made a huge effort on explaining how JMeter works, how to create your first test and more.
The Gatling Documentation is very clear and concise, like the philosophy of Scala.
There is really nothing more to say, the documentation talks about any feature in depth and covers the whole tool.
As you can see, both tools have comparable setup. When it comes to Tool Setup, the result is draw!
Both are JVM applications that must be installed as a standalone program on your machine. There is no real difference in installing JMeter or Gatling. Both are shipped as archives, no additional installation is required once you have a working Java JRE.
<?xml version="1.0" encoding="UTF-8"?><jmeterTestPlanversion="1.2"properties="2.8"jmeter="2.13 r1665067"><hashTree><TestPlanguiclass="TestPlanGui"testclass="TestPlan"testname="Test Plan"enabled="true"><stringPropname="TestPlan.comments"></stringProp><boolPropname="TestPlan.functional_mode">false</boolProp><boolPropname="TestPlan.serialize_threadgroups">false</boolProp><elementPropname="TestPlan.user_defined_variables"elementType="Arguments"guiclass="ArgumentsPanel"testclass="Arguments"testname="User Defined Variables"enabled="true"><collectionPropname="Arguments.arguments"/></elementProp><stringPropname="TestPlan.user_define_classpath"></stringProp></TestPlan><hashTree><ThreadGroupguiclass="ThreadGroupGui"testclass="ThreadGroup"testname="Thread Group"enabled="true"><stringPropname="ThreadGroup.on_sample_error">continue</stringProp><elementPropname="ThreadGroup.main_controller"elementType="LoopController"guiclass="LoopControlPanel"testclass="LoopController"testname="Loop Controller"enabled="true"><boolPropname="LoopController.continue_forever">false</boolProp><stringPropname="LoopController.loops">1</stringProp></elementProp><stringPropname="ThreadGroup.num_threads">1</stringProp><stringPropname="ThreadGroup.ramp_time">1</stringProp><longPropname="ThreadGroup.start_time">1433521552000</longProp><longPropname="ThreadGroup.end_time">1433521552000</longProp><boolPropname="ThreadGroup.scheduler">false</boolProp><stringPropname="ThreadGroup.duration"></stringProp><stringPropname="ThreadGroup.delay"></stringProp></ThreadGroup><hashTree><HTTPSamplerProxyguiclass="HttpTestSampleGui"testclass="HTTPSamplerProxy"testname="HTTP Request"enabled="true"><elementPropname="HTTPsampler.Arguments"elementType="Arguments"guiclass="HTTPArgumentsPanel"testclass="Arguments"testname="User Defined Variables"enabled="true"><collectionPropname="Arguments.arguments"/></elementProp><stringPropname="HTTPSampler.domain">google.Com</stringProp><stringPropname="HTTPSampler.port"></stringProp><stringPropname="HTTPSampler.connect_timeout"></stringProp><stringPropname="HTTPSampler.response_timeout"></stringProp><stringPropname="HTTPSampler.protocol"></stringProp><stringPropname="HTTPSampler.contentEncoding"></stringProp><stringPropname="HTTPSampler.path"></stringProp><stringPropname="HTTPSampler.method">GET</stringProp><boolPropname="HTTPSampler.follow_redirects">true</boolProp><boolPropname="HTTPSampler.auto_redirects">false</boolProp><boolPropname="HTTPSampler.use_keepalive">true</boolProp><boolPropname="HTTPSampler.DO_MULTIPART_POST">false</boolProp><boolPropname="HTTPSampler.monitor">false</boolProp><stringPropname="HTTPSampler.embedded_url_re"></stringProp></HTTPSamplerProxy><hashTree/></hashTree></hashTree></hashTree></jmeterTestPlan>
JMeter saves projects as an XML file with jmx extension. See JMeter JMX Format for more information.
JMeter is GUI oriented. Opening, editing and saving a JMX file must be made with JMeter Graphical interface.
Do not attempt to modify the JMX yourself, even if the XML is human readable, it's really not sustainable. JMeter's GUI probably suits well for people accustomed to graphical tools.
Here is what JMeter graphical interface looks like:
JMeter JMX is more verbose than Gatling Scala simulation. But, you're not intended to read the JMX file directly.
JMeter has a GUI to open those file, and display them. Gatling simulations are expected to be edited and modified directly.
In contrast to JMeter, Gatling Tool has no GUI. Editing the simulation requires you to write code.
Gatling tool is clearly made for developers, although they claim it can be used by non programmers too.
The Gatling simulation Scala syntax is pretty easy to understand, but as a developer so point of view is a little biased.
I would definitely recommend to use Scala IDE to edit Gatling Simulations. Intellij IDEA originally designed for Java also supports Scala via a plugin.
JMeter uses the One Thread = One User Paradigm. It means that each simulated virtual user inside the load generator equals to a single thread.
Wait times are simulated by Thread.sleep. The user waits for the server response when sending a request.
This is sometimes called Synchronous processing.
Gatling uses a more advanced engine based on Akka. Akka is a distributed framework based on the actor model.
It allows fully asynchronous computing. Actors are small entities communicating with other actors through messaging.
It can simulate multiple virtual users with a single Thread. Gatling also makes use of Async HTTP Client.
Gatling is technically superior to JMeter. The programming model is definitely more innovant.
Sure, the asynchronous thread model adopted by Gatling reduces CPU and memory usage a little bit, but usually the bottleneck comes from Network Bandwidth. Simulating 1K concurrent users on a single machine with 1GBps is equivalent to giving roughtly 1MBps per user. This is clearly much lower than DSL or 4G Bandwidth.
We decided to give the point to Gatling Tool. The innovative approach to the threading model, although bringing only minor benefits, merits attention.
You may ask: Which tool does support distributed testing?
Distributed Testing is the ability to use several slaves computers as load generators. The idea is to spread the load over multiple machines to be able to simulate more concurrent users.
When load testing an HTTP application, once you need to simulate several thousands users a single machine may not enough.
The load must be splitted among multiple machines. JMeter and Gatling tool are clearly not behaving the same way on this field.
JMeter is distributed. JMeter uses a master / slave architecture. The master is connected to slaves via the RMI protocol.
The master sends the JMX to simulate to each slave. Each slave plays the JMX. If you have 6 slaves, and your JMX simulates 1000 users, then you end up playing 6x1000 = 6000 users.
Results are sent back to the master for consolidation.
Gatling is single host. Although Gatling is based on Akka which is a distributed actor framework, Gatling is not distributed.
It cannot scale horizontally. You can of course launch multiple Gatling instances on different machines at the same time, but it's fully manual.
You will also need to consolidate the results from the multiple injectors manually.
JMeter stands out! Gatling Tool simply doesn't support distributed testing in the free version. Only Gatling Frontline, the paid Saas version, supports it.
Both JMeter and Gatling Tool have built-in HTTP Proxy Recorders. The principle is quite simple:
The proxy is a man-in-the-middle technique to intercept both client requests and server responses. Those requests and responses are then stored as a script.
Gatling has a separate Web proxy recorder, which works the same way as the JMeter recorder. It generates a Scala simulation from the recorded user session.
It has an interesting feature which allows to convert an HAR archive into a Gatling simulation.
To launch a test with gatling, run the .sh script and select the simulation (within user-files/simulations folder):
During the test run, gatling displays statistics within the console. The results of the test can be viewed at the end of the test.
Gatling generates a generic test report with response time, number of OK/KO transactions and detailed statistics for every request. The report is not customizable.
Like JMeter, Gatling can be plugged into external analysis tools too!
There are multiple companies that provide Cloud Load Testing for JMeter including brands like Blazemeter, Flood IO or RedLine 13.
All of them are just providing a facility to scale tests into the Cloud and provide a basic results reporting. You upload your JMX scenario or Gatling simulation to those providers, and they run your scenario on Cloud machines.
OctoPerf is world first JMeter Saas Company, providing JMeter Web UI Scripting. We also Scale from multiple locations and provide fully customizable test reports.
Some of the Cloud solutions exposed in the previous point also support Gatling Tool. Gatling Frontline is the defacto recommended standard for running Gatling tests in the cloud.
Before answering the crucial question, let's review all the scores:
Winner On
JMeter
Gatling
History
X
Features
X
Documentation
X
X
Setup
X
X
Scripting
X
X
Performance
X
Distributed Testing
X
HTTP Recorders
X
X
Test Execution
X
X
Cloud Load Testing
X
X
Total
9 / 10
7 / 10
JMeter is clearly the winner. With greater number of Features and support for Distributed Testing, JMeter compensates for slightly less performances than Gatling Tool. JMeter's Longer Presence can be seen with two different point of views:
The tool is old: True, JMeter is older and thus may be obsolete at some point,
The tool is mature: Thanks to years of support and maintenance, the tool is stable and battle-tested.
Choosing JMeter or Gatling tool really depends on what you are comfortable with. JMeter is QA Engineers oriented while Gatling is Devops Engineers oriented.
Both tools are overall really great. The end choice really comes to your own feeling. Which Tool Am I comfortable with? The first answer coming out of your mind is probably the good one.