I am using denvazh/gatling container and everything works well except one thing i try to pass list of simulations like this:
Attaching to gatling
gatling_1 | GATLING_HOME is set to /opt/gatling
gatling_1 | Choose a simulation number:
gatling_1 | [0] AppsPods
gatling_1 | [1] ServerSimulation
gatling_1 | [2] computerdatabase.BasicSimulation
gatling_1 | [3] computerdatabase.advanced.AdvancedSimulationStep01
gatling_1 | [4] computerdatabase.advanced.AdvancedSimulationStep02
gatling_1 | [5] computerdatabase.advanced.AdvancedSimulationStep03
I write such command as:
docker run -it --rm -v /home/core/gatling/conf:/opt/gatling/conf \
-v /home/core/gatling/user-files:/opt/gatling/user-files \
-v /home/core/gatling/results:/opt/gatling/results \
denvazh/gatling -s AdvancedSimulationStep01
but nothing make sense simulation list shows again and i need to choose test from list to start the simulation. So is it possible to run only that test witch i specify starting docker run command???
You need to give the fully qualified classname i.e
docker run -it --rm -v /home/core/gatling/conf:/opt/gatling/conf \ -v /home/core/gatling/user-files:/opt/gatling/user-files \ -v /home/core/gatling/results:/opt/gatling/results \ denvazh/gatling -s computerdatabase.advanced.AdvancedSimulationStep01
I run my simulations a little different, perhaps like this within Taurus harness, where bzt-configs
is the folder containing scripts, and artifacts
is the folder containing test output:
#!/bin/bash
clear
## use en0, not en1, if your on WIFI
OSX_HOST=`ipconfig getifaddr en0`
MACHINE_HOST=$OSX_HOST
CURRENT_DIR=`pwd`
if [[ -z "${GATLING_HOME}" ]]; then
GATLING_HOME=~/gatling
fi
EXEC_SUB_FOLDER=out-taurus
EXEC_FOLDER="$CURRENT_DIR/${EXEC_SUB_FOLDER}"
[ -d $EXEC_FOLDER ] || mkdir $EXEC_FOLDER
yes | cp -rf performance/my-simulation/scripts/* $EXEC_FOLDER
cd $EXEC_FOLDER
docker run -it --rm -e MY_ENV='dev' --add-host "machine-host:${MACHINE_HOST}" \
-v ~/.bzt-rc::/bzt-configs/.bzt-rc -v $PWD:/bzt-configs -v $PWD:/tmp/artifacts \
blazemeter/taurus:latest /tmp/artifacts/performance.yml
cd ..
Where .yml contains your Gatling bzt config:
execution:
- executor: gatling
scenario: MySimulation
modules:
console:
disable: 'true'
local:
sequential: 'true'
reporting:
- module: final-stats
scenarios:
MySimulation:
script: computerdatabase.advanced.AdvancedSimulationStep01.scala
simulation: MySimulation
settings:
check-interval: 1s
Then your gatling script can use the machine-host
name in /etc/hosts to call back to the test target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With