Tips for using Gatling Load Tests
As Gatling is a load and stress testing tool based on Scala and built for high performance, simple load tests can be run easily. To keep track of every load test, Gatling offers a dedicated recorder. The recorder window can be opened via the recorder.bat file in the \bin directory of the Gatling installation.
Configuring the Gatling script is pretty easy, as the domain-specific language is readable for humans. The basic configurations allow to configure the number of users, how they are run in the script or specific settings like a global pause, adding assertions or configuring HTTP or HTTPS protocols through the script.
Sometimes, initial results can give you all the answers you need. Therefore it does not always make sense to wait until a load test is finished. Through smooth integration with real time monitoring tools you can get already quick answers even quicker.
Gatling offers even more that you'd expect at first sight. The load test solution gives you even an integrated assertions API including a full arsenal to perform functional assertions. Different types of functional checks along with the actual performance testing can be run with the given API.
Although we assume you already know it, let's sum it up: A test in Gatling is called a simulation. The simulation defines all the actions, virtual users and the general scenario that will be executed.
Not forgetting container examples: To run Gatling simulations easily, you can use Gradle as a build tool and the gradle-gatling-plugin. The given setup will allow you to run gatling simulations simply with a single-line command like: $ gradle gatlingRun-performancetests.SearchSimulation - This will require Gradle to be installed, of course.
The different types of performance testing Gatling is capable of
Load testing: This most common type of performance tests checks the application’s ability to perform under-anticipated user loads. The objective is to identify performance bottlenecks that may be caused by too many users at a time or by other unforeseeable performance loads.
Stress testing: Unless load tests, stress tests involve testing applications under extreme workloads. This gives insight in how an application handles high traffic or data processing. By identifying the break point of an app, a stress test is basically successful.
Endurance testing: These kind of tests are done to make sure the software can handle the expected load over a long period of time. Therefore endurance tests don't bother with too high loads of incoming requests or data, but simply with the fact of ongoing stability of a system.
Volume testing: Giving an application varying database volumes, errors can occur. A volume test identifies such problems quickly.
Scalability testing: If an application can't scale up properly, it can't support an increase in the load. Therefore scalability tests are needed to help planning capacity additions to the existing system.
Spike testing: A spike test is actually a combination of load and stress tests. However, the spike test focusses on the software’s reaction to sudden large spikes in the generated load and its stability at that time.
Configuration testing: Configuration tests are common practise for lots of different systems. The objective is to see how changes made to parts of the system influence its responsiveness.
Soak testing: Virtual users became an important issue over the past years. By checking how a system behaves after a long period of usage by many virtual users with a so called soak test, problems can be avoided.
Copyright Gatling.dev Fan Foundation 2019 | Contact | Privacy | Legal
We are a team of independent developers who study together and discovered Gatling Load Testing for ourselves years ago. Although we are not official representants of the Gatling Corporation, we highliy recommend to use it for DevOps and Continuous Integration. Based on our studentship projects we help where we can and are happy to support everybody's journey with Gatling. Leave us a message or simply download the load testing solution directly from the official Gatling website.