osandadeshan / gatling-java-example

An example Gatling Maven project using Java DSL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:Apache License 2.0


Languages

Language:Shell 46.4%Language:Java 25.6%Language:Python 11.0%Language:JavaScript 8.0%Language:Makefile 4.8%Language:Dockerfile 4.3%