This project is an SouJava Team effort to get together the Gatling documentation into something real, updated, tested and that is ready-made for use in a CI environment.
This project will get you going with your load testing in few minutes, you will be able to target the following applications:
- REST API testing and general pages.
- Websockets
- JMS
Gatling is open-source, and yet a very powerful Test tool used for doing performance tests using a lightweight DSL written in Scala. Gatling will teach you to "treating your performance tests as production code".
Gatling is no tool for QA Manual testers, instead for SDET or Developers that are doing work to performance test their either for work or home projects.
Gatling integrates Jenkins and this is great because you run your performance tests daily as you develop your app.
This project integrates with Maven with the help of the maven-plugin.
Just because Maven is the default build for Java, and everyone knows how to use it.
Some people may say: "Why not use SBT if this is a Scala project, or maybe why not Gradle?"
The answer is: "Simplicity is the key, less is better the more, when less means easy to use and easy to understand".
I find SBT really interesting, but we have to be honest, not everyone knows it, and Gradle is doing a nice work, but is kind of complicated.
Maven 2+ OpenJDK 7+ Jenkins 1.6+ *In case you want to configure the CI project.
Make sure you have download Maven, then configure it using following configurations:
Add this variables in the .bashrc or bash_profile file. You should also add the bin directory to your $PATH, to have all your executable programs available from any directory
# bashrc or bash_profile
export M2_HOME=/xyz/apache-maven-3.0.5
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xmx1048m -Xms256m -XX:MaxPermSize=312M"
export PATH=$M2:$PATH
Install OpenJDK
$ sudo apt-get install openjdk-7-jdk
Install Maven via Jenkins configure Install Java via Jenkins configure
Use one of this targets to get to know about the load testing:
- java vertex https://vertx-simple-json-endpoint.herokuapp.com/hello
- play scala https://sheltered-tor-1754.herokuapp.com/hello
- nodejs 0.10.x -> https://desolate-harbor-2201.herokuapp.com/hello
- golang 1.3 https://limitless-basin-5531.herokuapp.com/hello
sudo mkdir /var/lib/jenkins/jobs/SouJava_Scala_Gatling_Generic_Test
sudo cp jenkins/config.xml /var/lib/jenkins/jobs/SouJava_Scala_Gatling_Generic_Test/
Reload jenkins configurations from disk
Open the job and run o/
Execute the following command and then check for the results o/
gatling:execute -Dgatling.simulationClass=soujava.BenchmarkGeneric -DNUM_THREADS=100 -DRAMP_TIME=100 -DDURATION=60 -DTARGET=http://vertx-simple-json-endpoint.herokuapp.com -DENDPOINT=/hello -DENDPOINT_NAME=HELLO_WORLD_VERTEX
TODO: Work in progress
TODO: Work in progress
Thomas Modeneis StackOverflow LinkedIn
This module is licensed under the MIT license.