Download Gatling For Mac

Gatling is an open source tool for performance and stress testing that is well worth adding to your personal tool knowledge repository. You may have already heard about Gatling if you’re working in the performance testing field.

What is Gatling?

Gatling is a load testing tool which can be used for your integrated development environment, version control systems and continuous integration solutions. It doesn’t have its own solutions but integrates with your existing solutions. It is built on top of Akka, which is a toolkit for building distributed message driven applications. It is a distributed framework which will allow for fully asynchronous computing. It is a small entity within code communicating with each other through messaging.

Download Airplane × If you are on Mac, copy this airplane ID to the clipboard and press CMD+L while in the designer in SimplePlanes to download this airplane. A powerful gatling gun constructed from mining equipment. How to use: FireGuns. Features: Button Trigger - A button type trigger. Gatling is a load testing tool for measuring the performance of web applications. As such, it supports the following protocols: HTTP, WebSockets, Server-sent events. Other protocols are also supported either by Gatling itself (like JMS) or by community plugins. Go to the download section on the Gatling website and click on the button 'DOWNLOAD NOW!' Note that the latest release is now Gatling 2.3.1. There is no specific installer or exe file for Gatling.

Using this mode Gatling can simulate multiple virtual users with a single thread. Akka override the JVM limitation of handling many threads. To perform load testing you don’t need to know anything about Akka or Scala. But if you want master in Gatling, You should learn at least Scala. Anyways it’s good to know about the technology behind Gatling. It is lightweight and can run thousands of virtual users on a single machine compare to other performance testing tools. It is always good to use a code base performance testing tool like Gatling over JMeter/LoadRunner. Also you can show off your coding skills. This will give you high flexibility for writing various logic for performance requirements.

The Gatling gun is one of the best-known early rapid-fire weapons and a forerunner of the modern machine gun. Invented by Richard Gatling, it is known for its. Jonah Hex (2010) Jonah Hex is a 2010 supernatural Western starring as a scarred bounty hunter who possesses the power to bring people back from the dead. Gatling is distributed as a zip file that you can download from their homepage, Installing it is just a matter of finding a good location and unpacking the zip file. C: users myuser testingapps gatling-charts-highcharts-bundle-3.3.1. There is really nothing left to do if the JDK is installed.

Gatling Key Features

There are lot unique features which Gatling offers compare to other performance testing tools. I have listed few of the key features of Gatling down below.

Scala-based

Although Gatling is Scala based you can use the tool without any actual Scala programming experience. Many of Scala’s design decisions are aimed to address criticisms of Java programming language. As I said earlier, if you can learn basic Scala programming knowledge then you can make your tests even more flexible. The beauty of the tool is that you have access to all the benefits of Scala and Java.

HTTP Protocol

Gatling also works based on the applications API for performance testing. You can directly configure API and can do performance testing instantly.

Gatling Recorder

Gatling comes with inbuilt script recorder, same like JMeter/LoadRunner. Recorder will intercept the communication between your browser and server, Also known as proxy recording. You can also use HAR files for making the script, which you can’t see in other tools like JMeter or load runner. In coming sections we will go through the step by step process to do the same.

Continuous Integration

Gatling can be integrated easily as part of continuous integration. It also provides step-by-step tutorials.

Why Gatling?

Gatling is fantastic tool when you just want to load/stress test you system without worrying much about other performance requirements. From a single JVM you can make several thousand concurrent users. There is no requirement to set up a distributed network of machines to do testing. As mentioned earlier, Gatling makes as great tool to add as part of your continuous integration. It is also great if you want to write your own code instead of simply recording the scripts.

Gatling

Now that we have some basic overview of Gatling use cases and features, we will see how to download and install it. Also, we will walk you through the step-by step-process of recording scripts. Later in this article, we will introduce the LoadView platform, which we feel goes above and beyond what Gatling offers when it comes to meaningful performance testing and engineering.

Gatling Installation and Sample Script Execution

You can download Gatling simply by visiting official website. Step-by-step procedures for installation and sample script execution is provided below.

Installing Gatling from Website

Let’s go ahead and download Gatling from their website.

Once you access the above website, you can download the Gatling performance testing tool. Here you have two options for download. Their Enterprise version has more features which we will need to pay for. So, for the purposes of this article, we will go with the open-source version for demo purpose. Once you click on the ‘open-source version’, the open-source version will start to download. Once your download is complete go ahead and unzip the folder. Everything you need to run it is inside that folder.

Gatling Tutorials and Installation Requirements

Gatling also provides good learning tutorials. Learn more about official Gatling tutorials. There are also some separate Windows and Mac installation prerequisites for Gatling. For the basic version to run, you need to have a JDK installed. Also, the tool requires at least JDK8. Learn more JDK8 and installation requirements.

Once you have gone through official Gatling documentation and set your environment with the required prerequisites, we will start the installation. Open the unzipped Gatling folder and go to the bin folder. From here we need to run Gatling. You can do this either from CMD or by browsing to the folder.

If you’re on a Mac, you could run with Gatling.sh. Since we’re using Windows, we will use Gatling.bat. Once you double-click on Gatling.bat, the tool will start up and run. Gatling also includes a few example scripts that we can execute and those scripts will be presented in the example section of downloaded folder.

Gatling Sample Script Execution

Once you double click on Gatling.bat, your Gatling will start up. You will get Gatling execution screen with number of default scripts shipping along with Gatling package.

We’re going to choose script [0] – Computer database.BasicSimulation, which is the computer database basic simulation. These scripts are targeted to the Gatling test site. Go ahead and type ‘0’ and press Enter. Gatling will ask you for to enter test description, you can give any valid description for your test.

Your execution will start instantly. Every five seconds or so, we’ll see output to the console. You can see you script ran for few minutes. After the execution, you will also get a success message saying Report is generated in the specific location.

Test Results

We are not getting into detailed report analysis at this point. If you are familiar with other performance testing reports, this will be piece of cake. We can see a test report has been produced in the mentioned location. I have included sample screenshots of the Gatling report below. Yes, those are HTML reports and you can further modify the Gatling configuration for report generation format.

Global Information Results
Gatling Statics Report

Congratulations! You’ve now downloaded Gatling and just run your first script.

Recording Using the Gatling Recorder

Here we are going to see how the Gatling recorder works and how it can help us record the scenarios. There are two main ways to create performance test scripts in Gatling either from writing up the code

Gatling Recorder

Gatling recorder is a GUI-based HTTP proxy recorder. This will help users to simply record a scenario and do the testing.

Manual Scripting

You need extensive knowledge of Scala for writing scripts.

For the purposes of this, article, we are going to show a demo of the Gatling recorder. The Gatling recorder is useful for getting a quick, basic script in place, especially if you’re first time user of Gatling. To start the Gatling recorder, browse to the Gatling bin directory and run the recorder.bat for Windows and recorder.sh for Mac/Linux.

Once you run the Gatling recorder, you will see the below screen.

Recording Modes

Let us discuss some of the Gatling recorder options. There are two recording modes in Gatling.

HTTP Proxy Mode

HTTP Proxy mode which captures all the traffic from your browser for a proxy

HAR Converter

HAR Converter which converts an HTTP archive file.

The HAR Converter is preferred since it gives you more control and has a lot less overhead with the recording setup. It is also much easier to set up for HTTPS Websites. Ultimately, it’s your preference. You can try both options and can choose the one that you like or that suits your needs.

There are a few other options we can change here, are marked as yellow below. We can configure whether to follow redirects, output folder, remove cache headers, etc. For now, let us keep all the other options as default.

Generate HAR File for Gatling Recorder

There are multiple ways which we can generate HAR file. Everyone knows how we can do that with the Google Chrome Developer Tool. Here, we’re going to show you how you can do that with Fiddler. If you don’t know Fiddler, Fiddler is network sniffling tool were you can capture request and response of client-server communications. Fiddler is more suitable for our needs since we can modify our request. Also, we can add/delete unwanted requests from HAR file.

Convert HAR File to Gatling Script Using Recorder

Now, we’re going to show how we can create and HTTP archive file (HAR file) using Fiddler. For demo purposes, I’m using the LoadView website.

Important note: Please do not execute performance test against websites without their consent. You can download fiddler here. Installation and setup is a very straightforward process. Once you have downloaded and installed Fiddler, launch Fiddler from your desktop.

Here, we have configured Fiddler to record only web browsers and HTTP traffic. You can enable network capturing by clicking next to web browsers. You can also learn about the additional Fiddler recording options that are available.

Record Your Scenario

Now you can start record the scenario you need to do performance testing by accessing it in any browser. We are going to navigate to the LoadView website and click on About Us.

As the page loads in the browser, at the same time you can see that getting captured in Fiddler.

Once you have captured your scenario, stop recording and do search by LoadView and delete all other requests. We need only request with loadview-testing.com.

Fiddler Requests

We have removed all the “junk” requests and kept only requests which we needed. You can remove that tracker request as well.

Next, go to File>>Export Sessions and save the request as HTTP archive V1.2

We are done with half of the work. If you are using Google Chrome for creating your HAR file, it will very tough to clean unwanted requests. That’s the reason we have suggested to use Fiddler.

Now, open Gatling recorder and browse to the Gatling bin directory. Double-click Launch Gatling Recorder. Change the recorder mode to HAR converter. Next, browse to the HAR file that we just saved. There is an option to blacklist images, CSS, etc., from the HAR file. Also, you can make Gatling to remember your preference and can be used next time by checking the Save Preferences button. Once you have done all the steps, click on the Start button to create the Gatling script.

We will get a message that the HAR file is successfully converted into a Gatling simulation.

Gatling Simulation File

Let us now look at the Gatling simulation file generated. Browse the Gatling installation folder then go to User-Files and open the Simulations folder. This will be the default folder directory for the Gatling recorder. You can see your script with the Class name you have provided. You can see and open this file using any text editor, or by using any developer tool. For this purpose, we’re using notepad++ to open and edit the script.

We have already gone through the steps for Gatling execution and report generation. Follow the same steps to execute a performance test using Gatling. Further script modification and simulation can be learned through Gatling setup documentation.

Gatling Tutorial Conclusion

So, as we’ve shown, there are a lot of steps, prerequisites, and additional downloads involved in the process. Don’t you think Gatling is more complex tool to use? If you are not from a programming background you will have tough time using Gatling. Do not worry, that’s why we’re going to also discuss the same process using the LoadView performance testing solution. LoadView is a cloud-based load testing solution that allows users to test their websites and applications in a shorter amount of time, without having to have a background in programming. In the following sections, we will show you a demo of LoadView, starting from scripting to report generation.

Load Testing Using LoadView

LoadView allows users to do all of your performance tasks in cloud. You can do scripting, execution, and reporting all from the same interface. Isn’t that awesome! We will show, step-by-step, of the load testing process for the same site which we scripted using Gatling. Compared to the process with Gatling, we think you will see it’s much more efficient and easier. You only need to script the user actions on the page using the built-in recorder and set up a load pattern. It’s really as simple as that!

Recording User Scenarios with the EveryStep Web Recorder

Download Gatling For Mac

Again, the website we are going to test is LoadView, the same website we used for Gatling. If you don’t have LoadView account, sign up is fast and easy – and you’ll receive $20 in load testing credits.

Select Your Load Testing Type

If you’re already signed up, you can navigate to your account and access LoadView and the EveryStep Web Recorder. Or just open the recorder first and then log in to your account. Click on New Test and this will open the LoadView recorder window as shown below. Select Web Applications.

Once you click on Web Applications, it will start the EveryStep Web Recorder. You need to enter web application address, which again, will be the LoadView website (https://www.loadview-testing.com/).

Device Compatibility Considerations

You can also do performance based device compatibility testing using LoadView. There may be a situation where you are facing issues only for your mobile devices. In that case you can select mobile/tab/laptop based on your application compatibility support.

Enter your URL and click the Record Now button.

Begin Recording with the EveryStep Web Recorder

The recording is now started. You just need to perform your specific steps/navigation on the screen. As you go through, you’ll see each step being recorded and entered below. Recorded script details are visible in the screen below the recorder.

End Your Recording

Once you have completed your use case scenario, click the Stop button. Next, will you need to click the Play Now button to replay the script. This will ensure that the script was recorded without any errors. If there are errors in the script, it will show the error message. If no errors occurred, it will show the success message. Save the script and modify later, if required.

Download Gatling For Mac
Edit Your Scripts

Once you have completed and replayed the recording, you can further enhance the scripts based on the additional logic required. LoadView supports adding context parameters, delays, correlations, etc. Learn more about editing your LoadView scripts.

Setting Up Your Load Test

You will be prompted to create a new device to configuring your load test execution. Name your device and continue with setting up your device. There are a couple of additional fields to configure under Settings, Completion Timeout and DNS Options, if those are necessary for your goals. Read more about setting up your load tests. Once you’re ready, you can select Create Device.

Configure Test Scenario

Choose any Load Type as per your requirement. There are a few different load curve options. Based on your performance work load model, you can decide your load type. We’ll go ahead with default settings and choose Load Step Curve.

Load Injector Geo-distribution

If you have a geographically dispersed customer base, LoadView allows you to choose from load generators located around the world. It’s always good practice to generate your load from the country, or regions, where your website or applications are used the most. This one of the best features about LoadView. You won’t get this kind of feature in most open-source performance testing tools out in the market today.

Finalize Your Load Test Details

Gatling Documentation

Once you have created your work load model, next you need to provide your email address so that your load test report will be delivered to your email. You can also schedule your load test for later time. This will enable you to spend your time on other tasks. LoadView will automatically start the execution at your scheduled time and the reports will be delivered to the email address you provided.

Start Your Load Test

Once everything is configured, click on the Start Test Now button. Your load test execution is started and status will be changed to Running. Give a few minutes for the load injectors to to start. You can view test summary tab for current load test status. Real-time load test graphical data will be available under the Execution Plan.

Cumulative Sessions & Errors

You can also observe additional graphs like total number of successful sessions and total number of errors by error type.

Load Test Report

After the test execution performance test report will be delivered to your email as a PDF attachment. You can also see that information from LoadView console. This can be shared with your team and various internal stakeholders.

That’s it. You just performed a load test with LoadView. As you can see, it was very straightforward and it just took a few clicks. And you didn’t need to do any complex coding.

Gatling Load Testing: Wrap Up

If this was your first exposure to Gatling, I’m sure you still have lot of questions, but you should have basic knowledge to consider using Gatling for your next project. Major advantages of Gatling is that it can generate so much load from a single machine, especially if you running Gatling in a continuous integrated environment. The real power of Gatling comes from running in a CI/CD environment along with a tool like Jenkins. If you are really interested to learn advance level Gatling, I would suggest you to learn Scala. And that may be too much of effort along with carrying out tests. Along with the tool, you need to learn a brand new language. I don’t think it’s worth spending your time on learning a new language. Instead you should be spending your valuable time on polishing up on your performance engineering skills.

This is where you can utilize the full potential of LoadView. You don’t need to spend extra time on learning a new tool, a new programming language, or managing load generators, etc. Just log in to the platform, record your script, and execute the load test. You can spend your valuable time on optimizing and scaling your applications. If you run into any issues, LoadView also offers unparalleled 24/7 support. Their performance engineers are standing by you to guide with the setups, scripting, and testing process if necessary. Start your LoadView trial today!

Prerequisites¶

Java Version¶

Gatling supports 64bits OpenJDK 8 and OpenJDK 11 with HotSpot.Other JVMs such as JDK 12+, client JVMs, 32bits systems or OpenJ9 are not supported.

Scala Version¶

Since 3.0, Gatling requires Scala 2.12.Gatling is not compatible with Scala 2.11 nor Scala 2.13.

Gatling Version¶

Make sure to use the latest version as documented on our website.

In particular, don’t use milestones (M versions) you could find on maven central,those are not documented and released only for internal use or FrontLine customers.

Using the Bundle¶

You can use Gatling as a standalone bundle.Then, you’ll just need a text editor, possibly with Scala syntactic coloration, to edit your simulationsand you’ll be able to launch Gatling from the command line.

Check out our Open Source page for the download link.

Unzip the downloaded bundle to a folder of your choice.Use the scripts located in the bin directory for launching Gatling and the Recorder.

Windows users : we recommend that you do not place Gatling in the Programs folder as there may be permission and path issues.

In order to run Gatling, you need to have a JDK installed.Gatling requires at least JDK8. Then, we recommend that you use an up-to-date version.

For all details regarding the installation and the tuning of the operating system (OS), please refer to the Operations section.

Gatling launch scripts and Gatling maven plugin honor JAVA_HOME env var if it’s set.
OS, like OSX, have their own tricky way of discovering which version of Java to run,so you might end up running a different version than the one java-version tells you.If you get strange errors such as Unsupportedmajor.minorversion51.0 and you were expecting to run a JDK8,you might want to explicitly set JAVA_HOME.

Using a Build Tool¶

Maven¶

Gatling Load Test

Gatling provides an official maven plugin named gatling-maven-plugin. This plugin lets you compile your Scala code and launch Gatling simulations.

Check the maven plugin documentation for more information.

Sbt¶

Gatling provides an official sbt plugin named gatling-sbt. This plugin lets you launch your Gatling simulations.

Check the sbt plugin documentation for more information.

Gradle¶

Gatling provides an official gradle plugin named io.gatling.gradle. This plugin lets you launch your Gatling simulations.

Check the gradle plugin documentation for more information.

Using an IDE¶

You can edit your Simulation classes with any text editor, maybe with some syntactic coloration for Scala.But if you are a developer, you’ll most likely want to use your favorite IDE with Gatling.

Gatling officially supports IntelliJ IDEA and eclipse.

IntelliJ IDEA¶

You’ll need to install the Scala plugin, which is available in the Community Edition.You’ll then be able to directly import regular maven or sbt projects with Scala sources out of the box.

Gatling Software

You’ll most likely have to increase the stack size for the scala compiler so you don’t suffer from StackOverflowErrors.We recommend setting Xss to 100M.

Eclipse¶

You’ll have to install ScalaIDE, preferably the latest version, even a milestone.

Sadly, as of today, ScalaIDE is only available for Eclipse 4.7 (Oxygen) and is not compatible with more modern versions.

Gatling

Gatling Testing

Note that Eclipse 4.7 doesn’t support Java 9+, so if you have multiple Java installations on your machine, you might have to force the JVM used in eclipse.ini, eg:

Moreover, if you’re using maven, you’ll need to install m2eclipse-scala to integrate ScalaIDE and m2e (the eclipse plugin for maven).

With sbt¶

If you’re using sbt, you can use sbteclipse to generate the eclipse project config.

With maven¶

If you’re using maven, you can use the scala-maven-plugin for compiling Scala code.

You’ll have to add the following section in your pom.xml:

Gatling Check

Launching Gatling and the Recorder from the IDE¶

The gatling-highcharts-maven-archetype generates some helper classes that you can use to launch Gatling and the Recorder manually from your IDE.You can perfectly copy those 3 classes (Engine, Recorder and IDEPathHelper) in your own project.

Please check the launchers documentation section.