Skip to content

osandadeshan/gatling-java-example

 
 

Repository files navigation

gatling-java-example

Build

An example Gatling Maven project using Java DSL.

Building

mvn clean package

Running

Using the executable jar file (run-simulation-using-jar.sh):

JAVA_OPTS="-DbaseUrl=http://localhost:8080  -DdurationMin=1 -DrequestPerSecond=10"
SIMULATION_NAME=gatling.test.example.simulation.ExampleSimulation
java ${JAVA_OPTS} -cp target/gatling-java-example.jar io.gatling.app.Gatling -s "${SIMULATION_NAME}"

Using the Gatling Maven plugin (run-simulation-using-plugin.sh):

mvn test -Pperf-test

Using the Docker container (run-simulation-using-docker.sh):

docker build -t gatling-java-example:latest .
docker run -e "JAVA_OPTS=-DbaseUrl=http://some-target-host:8080 -DdurationMin=1 -DrequestPerSecond=10" \
-e SIMULATION_NAME=gatling.test.example.simulation.ExampleSimulation gatling-java-example:latest

Working With Makefile

Build executable jar and Docker image

make dist image

Run Docker image:

make run

About

An example Gatling Maven project using Java DSL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.3%
  • Java 25.6%
  • Python 11.0%
  • JavaScript 8.0%
  • Makefile 4.8%
  • Dockerfile 4.3%