Write your First Gatling Test Script Programmatically
Write your first Gatling test script.
We'll cover the following
In the previous lesson, we learned how to create a basic project structure and the necessary dependencies. In this lesson, we will write our first Gatling test script.
Gatling test scripts need to be written in Scala and are quite simple. However, for writing any utility functions, it may require more knowledge of Scala. We highly recommend learning Scala in depth if this is required for your uses and projects.
If you want to learn Scala, take this free beginner’s course on Educative’s platform.
Sample Gatling test script
In the sample Gatling test script, we will create two scenarios for running HTTP requests: one containing GET and the other containing POST. In both scenarios, we will perform some assertions as well.
Get hands-on with 1400+ tech skills courses.