DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How to Install OroCRM on Ubuntu 20.04
  • 7 Techniques That Supercharged My Claude-Assisted Development
  • Beyond Request-Response: Architecting Stateful Agentic Chatbots with the Command and State Patterns
  • A Beginner's Guide to Docker Compose

Trending

  • Integrating AI-Driven Decision-Making in Agile Frameworks: A Deep Dive into Real-World Applications and Challenges
  • A Deep Dive into Tracing Agentic Workflows (Part 1)
  • Skills, Java 17, and Theme Accents
  • S3 Vectors: How to Build a RAG Without a Vector Database
  1. DZone
  2. Coding
  3. Frameworks
  4. How to Install Gatling on Ubuntu

How to Install Gatling on Ubuntu

Gatling is great for load testing with lots of useful options. Learn how to install iton Ubuntu so you can get started!

By 
Phi Nguyen user avatar
Phi Nguyen
·
Jun. 30, 18 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
14.5K Views

Join the DZone community and get the full member experience.

Join For Free

Load testing with the Gatling framework provides many powerful options, like assertions and flexibility. You can read more about Gatling here. But to get started, you need to have Gatling installed. This blog post will teach you how to install Gatling on Ubuntu, through the CLI. If you need to install Gatling on Windows, click here.

Update the Ubuntu packages to the latest version by executing the command sudo apt-get update

Currently, Gatling only supports JDK8 so we will install it by executing the commands below:

Add Oracle's PPA (Personal Package Archive) to the list of sources so that Ubuntu knows where to check for the updates.

add-apt-repository ppa:webupd8team/java

Install JDK8 using the following:

apt-get install oracle-java8-installer

If you have multiple java packages installed on your machine, decide which version to use as the default type by using the following command:

update-alternatives --config java

Set the JAVA_HOME environment variable by executing the commands below:

Open the /etc/environment file by the command vi /etc/environment

Add the following line at the end of the file and save it.

JAVA_HOME="/usr/lib/jvm/java-8-oracle"

Check to make sure java is installed on the machine by executing the command java -version. Here we can see "java current version," "java environment version," and "java server version."

Download the Gatling zip file by executing the command wget https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/2.3.1/gatling-charts-highcharts-bundle-2.3.1-bundle.zip

Move the file to our directory and unzip the file. In this example we moved it to /root and unzipped the file:

Then we have:

Set the GATLING_HOME environment variable by executing the commands below:

Open the /etc/environment file with the command vi /etc/environment

Add the following line at the end of the file and save it:

GATLING_HOME="/root/gatling-charts-highcharts-bundle-2.3.1"

Congratulations! You now have Gatling installed! You can now start out with your first Gatling load test. You can start by recording scenarios, customizing the scripts to meet your purposes and executing them.

Here is a quick explanation:

  1. Go to the bin directory with the command cd gatling-charts-highcharts-bundle-2.3.1/bin/
  2. Run the command ./recorder.sh. A recorder window will be automatically displayed. This is the default:

From here on, you can customize and record scenarios.

  1. Go to the bin directory with the command cd gatling-charts-highcharts-bundle-2.3.1/bin/
  2. Run the command ./gatling.sh. Load testing information will be displayed on the terminal, such as: the GATLING_HOME variable, Scripts, etc.

Choose the script file you want to execute from there.

That's it!

You can also take your Scala file and run it in BlazeMeter. You will be able to massively scale it and get immediate reports with advanced KPIs.

Gatling (software) ubuntu Command (computing)

Published at DZone with permission of Phi Nguyen. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How to Install OroCRM on Ubuntu 20.04
  • 7 Techniques That Supercharged My Claude-Assisted Development
  • Beyond Request-Response: Architecting Stateful Agentic Chatbots with the Command and State Patterns
  • A Beginner's Guide to Docker Compose

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook