Hi -
I am new to gatling (and scala world) and liking it so far.
I see https://github.com/excilys/gatling/wiki/Structure-Elements#wiki-group says there is support for it but I am having a difficult time figuring out how to use it. So my understanding is that a group contains a chain or chains of requests. Where would it fit in my scenario?
I can, but didn’t know group could be a direct chain under scenario ;). I’ll modify my simulation to do as you have suggested. The weird thing is that it still worked though
It will be nice if the DSL cheat is updated to add this in, that way, beginners like me aren’t so confused.
Also, I know there was a thread about the accuracy of grouped requests accumulation and the issue has been closed
Stephen out of urgency and desperation, I am building from source myself. Everything worked fine (or so I thought) when I ran the sample basic simulation until it tries generating the reports.
Exception in thread “main” java.lang.NoClassDefFoundError: com/excilys/ebi/gatling/charts/component/impl/ComponentLibraryImpl
at com.excilys.ebi.gatling.charts.report.ReportsGenerator$.generateFor(ReportsGenerator.scala:45)
at com.excilys.ebi.gatling.app.Gatling.generateReports(Gatling.scala:172)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:111)
at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:54)
at com.excilys.ebi.gatling.app.Gatling$.runGatling(Gatling.scala:73)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:49)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.ClassNotFoundException: com.excilys.ebi.gatling.charts.component.impl.ComponentLibraryImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
… 7 more
Press any key to continue . . .
Peeking into gatling-charts-1.4.2-SNAPSHOT.jar, I see the mentioned file is not there even though it is present in the source. I have attempted a full clean build to no avail. Same thing every time.
I am able to package with success (skipping tests - as some were failing)
About your build error :
Gatling is splitted in two projects, due to licensing issues : gatling (the one you built) and gatling-highcharts.
the first project contains almost all the code, except the code related to Highcharts and Highstock, the JS libraries we’re using for our charts.
The problem here is that you only built gatling and not gatling-highcharts : your simulation run well but fails at report generation because, essentially, a whole part of the charting engine is missing.
If you want to build Gatling from source, you’ll have to
grab both gatling & gatling-highcharts projects source code,
Wow, that was quick! Thanks Pierre. You guys rock! I’ll give it a spin right now.
Also, thanks for the build info. That is definitely handy info to have for when I need to live on the edge
I grabbed gatling-highcharts, built it and added it to the lib, and my build version now works to generate the reports as well. Now to test the group accumulation numbers with the build you provided.
The response time of a group is the duration of the execution of that group, i.e. every requests and groups within that group, pauses and every custom exec bloc.
So, it’s not only the sum of the response time of every requests.
Check your simulation if you have pauses that might explain the actual group duration.
Aha! That was it. Those pauses recorded while recording the scenarios.
Things add up nicely now.
Thanks Gregory!
Off topic: Is there a way to view the current state of things as the scenario is running (besides the shell)? It will be helpful to know how many users are currently in the system at any given point.
I’d tried your example below and it works, but is there a way to have the 1st exec removed? or maybe exclude all of the “request” from the report of gatling? Since I’m only interested with the timing of a group that I have defined instead of all the request being included in the report?
FROM THIS
val chain1 = exec(req2).exec(req3)
val chain 2 = exec(req4).exec(req5)
val scn = scenario(“myScenario”)
.exec(req1)
.group{
exec(chain1, chain2)
}.exec(req6)
TO SOMETHING like this
object Home{
val home = exec(req1) ← WOULD LIKE TO REMOVE THIS BUT IT WON’T WORK