denvazh / gatling Goto Github PK
View Code? Open in Web Editor NEWDocker image for gatling
Docker image for gatling
I am running the performance test using the docker and i can see it is running in DEBUG mode. I can see all the requests getting logged which is consuming lot of memory.
Is there are way not to log the request during the execution.
I believe if you use ENTRYPOINT ["gating.sh"]
it will allow someone to pass arguments to the gatling.sh script.
I am trying to reproduce my gatling simulation inside a docker container. However I get different results with and without a container.
Without containers I get a correct simulation, while using openjdk version "17.0.1" 2021-10-19 and gatling version 3.7.2:
GATLING_HOME is set to /Users/sjo00577/git/RAP/gatling-3-7-2
RAPtest is the only simulation, executing it.
Select run description (optional)
12:42:47.629 [WARN ] i.g.c.s.e.ElCompiler$ - You're still using the deprecated ${} pattern for Gatling EL. Please use to the #{} pattern instead.
n=67 offset=0 test=true char=/
n=67 offset=67 test=false char=/
n=83 offset=76 test=true char=/
<leaving out a large chunk of log file, picking up on results to show that it has worked>
================================================================================
2022-01-06 12:43:48 59s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=31 KO=1 )
> Home (OK=1 KO=0 )
> Home Redirect 1 (OK=1 KO=0 )
> polyfill.min.js (OK=1 KO=0 )
> ampersand.min.css?2007197015985610770 (OK=1 KO=0 )
> project.min.css?2007197015985610770 (OK=1 KO=0 )
> project.min.js?2007197015985610770 (OK=1 KO=0 )
> ampersand.min.js?2007197015985610770 (OK=1 KO=0 )
> lib.min.css?2007197015985610770 (OK=1 KO=0 )
> logo-ou.png (OK=1 KO=0 )
<leaving out a small chunk of log file, picking it up at the end to show that it terminates properly>
================================================================================
Reports generated in 0s.
Please open the following file: /Users/sjo00577/git/RAP/gatling-3-7-2/results/raptest-20220106114247711/index.html
However, the denvazh/gatling image does not work. That image uses gatling vs. 3.2.1, so I took the Dockerfile and adapted it to work with gatling vs. 3.7.2 to see if the version difference can explain the result. Unfortunately, both versions produced an identical result.
This is the result I get:
RAP % docker compose logs test-elf -f
gatling | GATLING_HOME is set to /opt/gatling
gatling | OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
gatling | RAPtest is the only simulation, executing it.
gatling | Select run description (optional)
gatling | 12:02:25.079 [ERROR] i.g.a.Gatling$ - Run crashed
gatling | java.lang.NullPointerException: Cannot invoke "String.trim()" because the return value of "scala.io.StdIn$.readLine()" is null
gatling | at io.gatling.app.Selection$Selector.askRunDescription(Selection.scala:141)
gatling | at io.gatling.app.Selection$Selector.$anonfun$selection$5(Selection.scala:61)
gatling | at scala.Option.getOrElse(Option.scala:201)
gatling | at io.gatling.app.Selection$Selector.selection(Selection.scala:61)
gatling | at io.gatling.app.Selection$.apply(Selection.scala:36)
gatling | at io.gatling.app.Runner.run0(Runner.scala:61)
gatling | at io.gatling.app.Runner.run(Runner.scala:49)
gatling | at io.gatling.app.Gatling$.start(Gatling.scala:87)
gatling | at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
gatling | at io.gatling.app.Gatling$.main(Gatling.scala:38)
gatling | at io.gatling.app.Gatling.main(Gatling.scala)
gatling | Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.trim()" because the return value of "scala.io.StdIn$.readLine()" is null
gatling | at io.gatling.app.Selection$Selector.askRunDescription(Selection.scala:141)
gatling | at io.gatling.app.Selection$Selector.$anonfun$selection$5(Selection.scala:61)
gatling | at scala.Option.getOrElse(Option.scala:201)
gatling | at io.gatling.app.Selection$Selector.selection(Selection.scala:61)
gatling | at io.gatling.app.Selection$.apply(Selection.scala:36)
gatling | at io.gatling.app.Runner.run0(Runner.scala:61)
gatling | at io.gatling.app.Runner.run(Runner.scala:49)
gatling | at io.gatling.app.Gatling$.start(Gatling.scala:87)
gatling | at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
gatling | at io.gatling.app.Gatling$.main(Gatling.scala:38)
gatling | at io.gatling.app.Gatling.main(Gatling.scala)
^C^CERRO[0168] got 3 SIGTERM/SIGINTs, forcing shutdown
I have also done an experiment with the official image of openjdk version 17.0.1, to be entirely sure that gatling runs the same java as my laptop. However, the result is identical again. So it might be something different than version conflicts here...
See here: #19 (comment)
Hi, I'm new to CI/CD and is looking into Gatling integrating with CI/CD.
Is there any chance that this project will continue to update? Thanks a lot in advance.
HI, all
This library works very well.
But I recently faced a problem.
In my test scenario, I need dependency libraries such as spray json and dropWizard metric.
So in this case,
If you move it to /opt/gatling/user-files/simulations
, an error occurs because there are no dependencies in ZicCompile.
Is there any way to solve this? Ideas don't come to mind.
Thanks for reading the article :)
Getting below message at docker console,my user files in windows 10 machine is here
C:\PerfTools\Gatling\gatling-charts-highcharts-bundle-3.0.0-bundle\gatling-charts-highcharts-bundle-3.0.0\user-files
why docker unable to find it?please guide me
dast@WS-124157L MINGW64 /c/Program Files/Docker Toolbox
$ 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
GATLING_HOME is set to /opt/gatling
15:17:27.730 [main] DEBUG io.gatling.compiler.ZincCompiler$ - Full compilation, no sources in previous analysis.
15:17:27.978 [main] DEBUG io.gatling.compiler.ZincCompiler$ - Compilation successful
15:17:30.132 [main] INFO io.gatling.core.config.GatlingConfiguration$ - Gatling will try to use 'gatling.conf' as custom config file.
15:17:31.757 [GatlingSystem-akka.actor.default-dispatcher-2] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
There is no simulation script. Please check that your scripts are in user-files/simulations
With Scala 2.13 there is a lot of extra functionality that would be useful.
Also there are newer versions of Gatling too that are not included here.
I would be happy to contribute, however, I am by no means great with JAVA or Scala.
I assume it is simply updating the openJDK image and gatling versions.
Hello,
I noticed that recorder.sh
uses /bin/bash
instead of /bin/sh
so it won't work unless you install bash as well.
Regards
Please remove temporary data under /tmp/
in same RUN command
Hello,
I'm trying to use your docker image for gatling tests.
It works great on my computer, as well on my ci product : Bamboo.
At the end of the execution, i store the generated result (gatling web site) into a Bamboo artifact.
The issue here is : the simulation reports are stacking into the gatling/result directory each time a bamboo execution is launched.
So i managed to clean up the environment before gatling execution, and i get an error : permission denied.
I'm not able to delete previous report because, report are created with the root user in the container, and my bamboo user does not have enough privileges.
I have modified your docker file to create a non root user and group that is configured through env variable from the docker run command.
Here, the created docker user is configured with a same group that my bamboo user (let say 1024).
Doing this way, i can clean up my bamboo workspace before gatling run.
As i'm not an docker expert, could you please have a look on my docker file, but i'm not sure this is the best way to do it.
At least, could you consider to add an option to your docker file to enable run from non root user ?
Thank you
FROM openjdk:8-jdk-alpine
MAINTAINER Denis Vawzhenin [email protected]
WORKDIR /opt
ENV GATLING_VERSION 3.0.3
ENV USER_GROUP_ID 1024
ENV USER_GROUP_NAME gatling
ENV USER_NAME gatlingRUN addgroup --gid $USER_GROUP_ID $USER_GROUP_NAME
RUN adduser -D -H -G $USER_GROUP_NAME $USER_NAMERUN mkdir -p gatling
RUN apk add --update wget bash libc6-compat &&
mkdir -p /tmp/downloads &&
wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip
https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip &&
mkdir -p /tmp/archive && cd /tmp/archive &&
unzip /tmp/downloads/gatling-$GATLING_VERSION.zip &&
mv /tmp/archive/gatling-charts-highcharts-bundle-$GATLING_VERSION/* /opt/gatling/ &&
rm -rf /tmp/*WORKDIR /opt/gatling
VOLUME ["/opt/gatling/conf", "/opt/gatling/results", "/opt/gatling/user-files"]
ENV PATH /opt/gatling/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV GATLING_HOME /opt/gatlingRUN chown -R $USER_NAME:$USER_GROUP_NAME /opt/gatling
ENTRYPOINT ["gatling.sh"]
Tested for version 3.2.1 on 2 separate M1 Macs, running the container the following way:
docker run -it --rm denvazh/gatling
results in
GATLING_HOME is set to /opt/gatling
being printed. There is no option to run a simulation, neither is an error printed.
We've tested this on 2 Intel-chip Macs and it'd worked fine.
Would be very grateful for fixing this :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.