Comparisons

Gatling vs JMeter: tests as code or a GUI test plan?

7 min read

Gatling and Apache JMeter are both free, open source load testing tools that run on the JVM, and the choice comes down mostly to how your team wants to build tests. Pick Gatling if you want tests as code in Java, Kotlin, Scala, JavaScript or TypeScript, open injection profiles and an HTML report after every run. Pick JMeter if you need protocols such as JDBC, LDAP, FTP or mail out of the box, prefer to build tests in a GUI, or already own .jmx test plans.

The facts in this Gatling vs JMeter comparison come from each project’s own documentation and repository, checked on 9 October 2026.

GatlingApache JMeter
LicenceApache 2.0; gRPC, MQTT and GraphQL under a separate component licence (repository)Apache 2.0 (repository)
RuntimeJVM, OpenJDK LTS 11 to 25 (release 3.16.0)JVM, Java 8 or later (release 5.6.3)
Tests written asCode in Java, Kotlin, Scala, JavaScript or TypeScriptTest plans built in a GUI, saved as XML .jmx files
Built-in protocolsHTTP/1.1, HTTP/2, WebSocket, Server-Sent Events, JMSHTTP(S), SOAP/REST, FTP, JDBC, LDAP, JMS, mail, TCP, shell commands, Java objects
RecorderHTTP proxy or HAR file converterHTTP(S) Test Script Recorder (proxy)
Load modelOpen or closed injection profilesThread groups; an experimental Open Model Thread Group
Scaling outOne machine; distributed runs need Gatling EnterpriseBuilt-in remote mode, one client driving many servers
CI and headless runsMaven, Gradle, sbt and npm plugins; a failed assertion fails the runCLI mode (jmeter -n); third-party Maven, Gradle and Jenkins plugins
ReportsHTML report after each runHTML dashboard; live results through a Backend Listener

What is the difference between Gatling and JMeter?

In Gatling a test is a program in a build project. In JMeter a test is a tree of elements you assemble in a desktop GUI and save as an XML file, and most other differences follow from that.

Gatling’s README calls the tests simulations and keeps them in your repository like application code, run through a Maven, Gradle, sbt or npm plugin. The JavaScript and TypeScript SDK installs through npm and downloads its own GraalVM runtime.

A JMeter plan holds a thread group for the users, samplers for the requests, and assertions and listeners for the results. JMeter 5.6.3, the current release on the download page, requires Java 8 or later. The README on JMeter’s development branch already calls for Java 17 (checked on 10 October 2026). Underneath, JMeter runs each virtual user as a Java thread, while Gatling’s README describes them as lightweight messages on a non-blocking Netty engine.

How do you write a test in each tool?

In Gatling you write a simulation class that sets up a scenario, an injection profile and assertions. In JMeter you add a thread group and samplers in the GUI, save the plan, then run it from the command line.

A Java simulation modelled on Gatling’s first simulation tutorial: new users arrive at one per second, rising to ten per second over a minute and holding there for five minutes. It fails if the 95th percentile tops 500 ms or more than 1% of requests fail:

import static io.gatling.javaapi.core.CoreDsl.*;
import static io.gatling.javaapi.http.HttpDsl.*;

import io.gatling.javaapi.core.*;
import io.gatling.javaapi.http.*;

public class ApiSimulation extends Simulation {

  HttpProtocolBuilder httpProtocol =
      http.baseUrl("https://staging.example.com");

  ScenarioBuilder users = scenario("API users")
      .exec(http("list users").get("/api/users"))
      .pause(1);

  {
    setUp(users.injectOpen(
            rampUsersPerSec(1).to(10).during(60),
            constantUsersPerSec(10).during(300)))
        .protocols(httpProtocol)
        .assertions(
            global().responseTime().percentile(95.0).lt(500),
            global().failedRequests().percent().lt(1.0));
  }
}

Run it with ./mvnw gatling:test; a JavaScript or TypeScript simulation runs with npx gatling run.

In JMeter the same test is a thread group holding an HTTP Request sampler, and a Duration Assertion can mark each slow response as failed. The getting started guide builds the plan in GUI mode and runs it in CLI mode, with -e -o adding the HTML report:

jmeter -n -t api-users.jmx -l results.jtl -e -o report/

Both tools can record a first draft from a browser. Gatling’s Recorder works as an HTTP proxy or converts a HAR file into a simulation, and JMeter’s HTTP(S) Test Script Recorder captures browser traffic into a plan (checked on 9 October 2026). Gatling’s docs now list its Recorder as legacy, and the newer Gatling Studio needs an Enterprise account to log in (checked on 10 October 2026).

Which protocols can each tool test?

JMeter covers more protocols out of the box. Gatling ships with the main web protocols plus JMS, and leaves most of the rest to separate components or community plugins.

JMeter’s README lists every protocol in the table above. JDBC and JMS need driver jars from your database or JMS provider, and the Plugins Manager adds community plugins from inside the GUI.

Gatling’s README says gRPC, MQTT and GraphQL are separate components under the Gatling Enterprise Component License, capped at five concurrent users and five-minute tests without Enterprise. Kafka, AMQP, SFTP, FTP and JDBC come from third-party plugins for Gatling 3.13 that Gatling does not maintain (checked on 9 October 2026).

How do Gatling and JMeter model load?

Gatling makes you choose between an open and a closed model in the script itself. JMeter’s classic thread group is a closed pool of users, and arrival-based load needs the newer Open Model Thread Group.

In Gatling, injectOpen takes arrival rates such as constantUsersPerSec and rampUsersPerSec, and injectClosed takes concurrency targets such as constantConcurrentUsers. JMeter 5.5 added the Open Model Thread Group, which the reference still marks as experimental (checked on 9 October 2026). Our guide to the open vs closed workload model explains why that choice matters.

How do you run a test across several machines?

JMeter has a distributed mode built in. Gatling’s open source edition generates load from one machine, and its docs list a Gatling Enterprise account as a requirement for distributed runs.

JMeter’s remote testing mode lets one client control any number of servers. Each server runs the whole plan, so 1,000 threads on six servers means 6,000 threads. All nodes should run the same JMeter and Java versions, RMI needs a keystore unless SSL is disabled, and data files must be copied to each server.

There is a third route for JMeter test plans. LoadFocus, which publishes this site, runs existing JMeter test plans unchanged from 25 cloud regions, with no remote servers to set up. LoadFocus does not run Gatling simulations.

How do they fit into CI, and what reports do you get?

Both run headless. Gatling’s assertions can fail the build directly, while JMeter’s assertions flag individual samples and CI support comes from third-party libraries.

Gatling assertions are checked after the run, and one failed assertion fails the simulation and the build task. The HTML report shows response time percentiles, users started per second, concurrent users and requests per second over time.

JMeter’s CLI mode has no pass/fail option, so a missed target fails the build only through the Maven, Gradle and Jenkins libraries its README lists, or your own check. JMeter’s dashboard adds an APDEX table, a statistics table with three configurable percentiles and error summaries, and a Backend Listener streams live results to InfluxDB or Graphite.

Which one should you choose?

Choose Gatling when your team writes Java, Kotlin, Scala or TypeScript and wants load tests reviewed like the rest of its code. Choose JMeter instead when you need protocols beyond the web, when your testers prefer a GUI, or when you already have .jmx plans.

Gatling suits teams that describe traffic as arrival rates, want pass/fail rules next to the scenario and a readable report with no extra setup.

JMeter is the better choice for JDBC, LDAP, FTP or mail testing, for testers who refine a recorded flow visually, and for distributed runs on your own servers without a commercial licence. A company that already runs JMeter also keeps its plans, plugins and know-how.

FAQ

Is Gatling faster than JMeter? We have not measured this ourselves, so we will not name a winner. The fair test is the same scenario with both tools on your own hardware.

Can Gatling run JMeter .jmx files? Not directly. Gatling runs simulations written with its SDKs, so a JMeter plan has to be rewritten. Gatling’s README lists AI extensions that convert JMeter test plans and require a Gatling Enterprise API token.

Can LoadFocus run Gatling tests? No. LoadFocus runs JMeter test plans and k6 scripts. To spread a Gatling simulation across several machines, use Gatling Enterprise.


The technical claims in this article have not been independently reviewed.

LoadFocus team
Written by the LoadFocus team, the people behind a cloud load testing service.