Gatling is a load- and performance-testing framework based on Scala, Akka and Netty. The first stable release was published on January 13, 2012. In 2015, Gatling's founder, Stéphane Landelle, created a company (named "Gatling Corp"), dedicated to the development of the open-source project. According to Gatling Corp's official website, Gatling was downloaded more than 20,000,000 times (2024). In June 2016, Gatling officially presented Gatling FrontLine (now Gatling Enterprise), Gatling's Enterprise Version with additional features.[1]
The software is designed to be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications, APIs, and microservices.
Gatling was mentioned twice in ThoughtWorks Technology Radar, in 2013 and 2014,[2] "as a tool worth trying",[2] with an emphasis on "the interesting premise of treating your performance tests as production code".[2]
The latest minor release is Gatling 3.11, published on April 23, 2024.[3]
Overview
Gatling Corp develops the open-source performance testing tool for web applications, Gatling, and its enterprise version, Gatling Enterprise. The Project's aims include:
High performance
Ready-to-present HTML reports
Developer-friendly DSLs for Java, Scala, Kotlin, JavaScript, and TypeScript
Terminology
Simulation: The simulation file includes the different scenarios of a test, its parametrization and the injection profiles. Technically speaking, a simulation is a Scala class.[4] Here are examples of simulations in Java and JavaScript:[5][6]
//JavapublicclassComputerDatabaseSimulationextendsSimulation{HttpProtocolBuilderhttpProtocol=http.baseUrl("https://computer-database.gatling.io").acceptHeader("application/json").contentTypeHeader("application/json");ScenarioBuildermyFirstScenario=scenario("My First Scenario").exec(http("Request 1").get("/computers/"));{setUp(myFirstScenario.injectOpen(constantUsersPerSec(2).during(60))).protocols(httpProtocol);}}
Scenario: A scenario consists of a series of requests. Each scenario within a simulation can have its own injection profile.[7] Here is an example of a scenario:[5][6]
//JavaScenarioBuildermyFirstScenario=scenario("My First Scenario").exec(http("Request 1").get("/computers/"));{setUp(myFirstScenario.injectOpen(constantUsersPerSec(2).during(60))).protocols(httpProtocol);}
Group: Groups can be used as a subdivision of a scenario. It is also a series of requests, that has a functional purpose (for instance, the login process).
Request: Gatling is able to simulate complex users' behaviors. For this purpose, it generates the appropriate requests in the system under test. Here is an example of a request in Gatling:[5][6]
Injection profile: An injection profile is the number of virtual users injected during the test in the system under test and how they are injected. Here is an example of an injection profile:[5]
Gatling implemented a fully new architecture for a performance testing tool, in order to be more resource efficient.[8] It makes it possible to simulate a high number of requests per second with a single machine.[9]
Components
Recorder
Gatling comes with a recorder to bootstrap a simulation.
Domain-specific language
Gatling is provided with a simple[10] and lightweight[2]Domain-specific language, in which simulations and scenarios are coded. This allows users to add custom behavior through many hooks.[11] This makes simulation scripts readable and easy to maintain.[12]
In 2024 Gatling introduced a new DSL (SDK) for JavaScript and TypeScript.[13] The JavaScript and TypeScript SDK uses GraalVM to translate JavaScript code to Java and execute load tests on a JVM. The addition of JavaScript and TypeScript support makes Gatling the first polyglot load testing tool in the market.
Gatling documentation states that it is protocol agnostic, which makes it possible to implement other protocols' support.[15] Here is a non-exhaustive list of community protocols support:
Automation with Gatling is related to its simulations' maintainability.[16] The integration with other developer tools, especially in the DevOps lifecycle, makes it possible to industrialize performance tests, that is to say to fully automate the execution of performance testing campaigns in the software development process.
Gatling Enterprise is the commercial version of Gatling. Gatling Enterprise is proprietary software. It is distributed by Gatling Corp.
Company
Gatling started as an open-source project in 2012. 3 years later, in 2015, its founder, Stéphane Landelle, created a dedicated company named "Gatling Corp".
Origins of the open-source project
Gatling was designed by Stéphane Landelle when he was the Chief Technology Officer (CTO) of a French IT consulting firm, eBusiness Information.
Creation of a dedicated company
In 2015, a dedicated company was created. It provides Gatling's users with professional services and, since 2016, with an Enterprise Version of Gatling, Gatling FrontLine.
The company is based in Bagneux, France, near Paris.
The company took part in some events, like the Paris Open Source Summit (POSS, 2015, 2016 and 2017 editions), Liferay's 2016 Symposium, Java User Group (JUG)'s meetings, the Paris Gatling User Group and the New York Gatling User Group.
^Lyudmil Latinov (9 June 2017). "Performance testing with Gatling". Automation Rhapsody. Retrieved September 1, 2017. "Simulation" is the actual test. It is a Scala class that extends Gatling's io.gatling.core.scenario.Simulation class. Simulation has a HTTP Protocol object instantiated and configured with proper values as URL, request header parameters, authentication, caching, etc. Simulation has one or more "Scenario".
^Lyudmil Latinov (9 June 2017). "Performance testing with Gatling". Automation Rhapsody. Retrieved September 1, 2017. Scenario is a series of HTTP Requests with different action (POST/GET) and request parameters. Scenario is the actual user execution path. It is configured with load users count and ramp up pattern. This is done in the Simulation's "setUp" method. Several scenarios can form one simulation.
^Siva Prasad Rao Janapati (1 February 2017). "Gatling: A Lightweight Load Testing Tool". Performance Zone. DZone. Retrieved September 1, 2017. Gatling consumes fewer system resources to run a load test than other options.
^Lyudmil Latinov (9 June 2017). "Performance testing with Gatling". Automation Rhapsody. Retrieved September 1, 2017. It is capable of creating an immense amount of traffic from a single node.
^Sree Tejaswi (4 January 2017). "An Introduction to Load Testing With Gatling". DevOps Zone. DZone. Retrieved September 1, 2017. It is an easy-to-install tool where simulations and scenarios are coded in a simple domain-specific language (DSL).
^Sree Tejaswi (4 January 2017). "An Introduction to Load Testing With Gatling". DevOps Zone. DZone. Retrieved September 1, 2017. You can thus generate readable and easy to maintain performance test code.
^"Gatling". Documentation. Gatling Corp. Retrieved September 1, 2017. As the core engine is actually protocol agnostic, it is perfectly possible to implement support for other protocols.
^Federico Toledo (12 July 2016). "Gatling Tool Review for Performance Tests (Written in Scala)". Performance Zone. DZone. Retrieved September 1, 2017. The language, Scala, and Gatling's DSL are pretty focused on facilitating the maintainability of the tests, which is ideal if you are focusing on continuous integration
^"License". Gatling's repository. GitHub. Retrieved September 1, 2017.
^New Media Rights (2008-09-12). "Open Source Licensing Guide". California Western School of Law. Retrieved 2015-11-28. The 'BSD-like' licenses such as the BSD, MIT, and Apache licenses are extremely permissive, requiring little more than attributing the original portions of the licensed code to the original developers in your own code and/or documentation.