4. Key Features of Gatling
● Command-line tool
● Scala language for scripting
● Post-test HTML reports
5. Value of Gatling for Users
● Full power of programming language
● Easy to use custom code pieces and extra libraries
● Flexible load injection profiles
● Asynchronous concurrency model
8. Scripting Approach
● Simple GUI vs Scala for techies
● In JMeter you see one component at a time / Scala is code
● JMeter JMX files are not VCS-friendly / Scala files are
● Code re-use and modularity in JMeter is huge pain
● Coding skills requirement is a limitation for Gatling
VS
9. Load Profiles
● Arrivals-based injection
● Concurrency-based injection
● RPS throttling
● All is doable in JMeter + Plugins
● In Gatling, it is not as obvious as in JMeter
VS
10. Community & Popularity
● JMeter is far more popular in net number of users
● Gatling users are more skilled techies on average
● More content on JMeter than on Gatling
● More tools, integrations and services support JMeter
VS
12. What can be Improved for Gatling
● Easier start for beginners
● Rich real-time report
● Reports storage - collaborative and persistent
● (no) Distributed testing
● Startup time
18. Demo: Real-Time Reporting and Cloud Scaling
● Distributed testing with 1000s of machines
● Multi-geo tests enablement
● Reports are persistent and have trends
+
19. Final Summary
1. Gatling is very similar to JMeter
2. Requires more technical skills
3. Taurus mitigates its problems
4. BlazeMeter for reports and scaling
21. Next Steps
● Create your free account at blazemeter.com
● Taurus – gettaurus.org
● Gatling – gatling.io
● Performance Testing Blog – blazemeter.com/blog
● Learning Resources – blazemeter.com/resources
Stay tuned!
Editor's Notes
Gatling is a cross-platform JAVA application
Its main purpose is for load and performance testing
It has no gui, no web ui, only command line tool style of usage
It uses Scala language for scripting – Scala is very much like java, and the whole gatling tool is build with Java and runs on top of JVM.
Scala has some specific features which differs it from Java.
Gatling is very good with flexibility of the load injection profiles - out of the box its capabilities are superior to jmeter. It can be compared to Jmeter+plugins
Gatling uses Asynchronous concurrency model - It doesn't’t require a operating system thread for each virtual user, instead it uses Asynchronous model where 1 thread can serve many virtual users and many connections. Many users like this because it lets you generate many users from a single machine.
To install gatling just unpack the zip folder
BasicSimulation.scala
Package declaration which is optional
Set of imports we need to reference the gatling dsl instructions for our Scala script
We declare the simulation file - this is one of the key things, it specifies the test execution
Then the actual configuration for the protocol: http target http with some headers, our protocol definition which we will use later and the scenario flow itself
The scenario is the sequence of steps to perform which represents the virtual users behavior
Last, on the setUp part, we specify the load profile and specify which protocol to use (Httpconf that we configured before)
Command line to run gatling:
This is the command Line to run: ~/.bzt/gatling-taurus/2.3.0/bin/gatling.sh -sf . -mwe set the simulation folder parameter to the current directory in my case-m makes it more silent (if we don’t use it, gatling will ask me a lot of questions)
it take a few seconds for gatling to start and then if I have several simulations declared in the same directory, it will ask me which one to use
It ran my test, the test specifies just 1 iteration so its really fast, it gives me some basic numbers and also a hyperlink to an html report that I can open in a browserthis is the report of gatling tool, this is the basic gatling usage
Simulation is the joint is scenario+injection profile+protocol
You should point gatling to the location of your simulation file
There is also an important simulation files naming convention - the file holding the simulation, should match the name of the simulation classbecause of JVM usage, the way to resolve the classes and find classes is to have matching names
Gatling and JMeter mostly match to each other in terms of throughput that they can produce
Scripting approach is the major difference
JMeter is easier to start with for non-technical people - it doesn’t require knowledge of java naming conventions or programming language structures
if we compare gatling to jmeter+plugins than the load profiles match
Arrival based injection is when you look at your google analytics and see that within an hour, you see 500 users coming to your website and doing their job and then leaving - this means that you don’t always know the amount of concurrent users but you only know your arrivals amount.
No rich real-time report - this is crucial as in modern load testing, you can’t allow yourself to run a 1 hour load test and see the results only after 1 hour. This is a really important gap
We need our reports to be collaborative and persistent because we don’t work alone! We work in teams, usually multi-geo teams and we need the abiliy to share reports of tests, even before the tests are completed. We need the ability to see trends and compare the results of today’s test to the test that we ran 1 month ago and see if there was an improvement - usually there will be a segregation in performance and we will need to pay additional attention to improve and and more resource on performance.just having a couple of reports laying around is simply not enough for modern performance testing
There is simply no distributed testing in gatling - in jmeter there is some and it has limitation but gatling is simply limited to running only on 1 machine out of the box
For large tests, it takes a bit of time for it to startup but this is deep inside gatling and we can’t really do anything to fix it
We tried to collect the solutions for typical problems of jmeter, gatling, selenium and other open-source tools in Taurus
File layout - you don’t need to think about where to place your files and how to specify command line parameters for gatling
Show gatling-req.yml and run it. Show the artifact with Scala script that was generated
Show gatling-existing.yml
Show gatling-req.yml -cloud
Show trend charts
Show ‘bzt-locations’ and then multi location gatling test and run it - show previous test that I ran on multi locations
gatling works on the protocol level so it doesn’t parse and execute Ajax requests automatically, you will have to record the interaction between the web page and the backend, and then use the generated script to simulate the network level of the communication.this is the same for jmeter - jmeter does its best to parse the static requests from responses, but for Ajax requests you have to program or record the jmeter script to do the Ajax requests (same thing for gatling)