Gatling is a neat tool. You can create your load tests by just coding in scala. Jmeter allows you to do so through a plugin or beanshell but it is not as direct as the way gatling does so.
I will start by adding the gatling plugin
The next step is to changed the build.sbt
The above are no different than what you can find on the official site when it comes to sbt commands and gatling.
Our next step is to add a simple http test. Be aware that you should add it in the directories src/test or src/it since, as it is instructed from the sbt dependencies for the binaries to take effect on these directories.
I shall put this test on src/test/scala/com/gkatzioura/BasicSimulation.scala
Afterwards testing is simple. You go to sbt mode and execute the test.
The first command instructs to run just one test, the second one shall run everything.
That’s it! Pretty simple.