gatling-maven plugin: reportsOnly appends /true to all paths

415 views
Skip to first unread message

Håkan

unread,
Mar 16, 2018, 4:52:40 AM3/16/18
to Gatling User Group
Hi folks,

I am running Gatling 3.0.0-SNAPSHOT in a Jenkins instance and it generally works well. However, after a stress test failed to complete I am unable to generate the report using the gatling-maven plugin, either because I am doing it wrong or because there is some issue with the plugin:

I have set up the Jenkins job with this Maven goal: gatling:execute -Dgatling.reportsOnly -Dgatling.resultsFolder=/var/lib/jenkins/workspace/my-combo-stresstest/target/gatling/mycombosimulation-1521127678547

However, the path that is fed to Gatling is the one specified in -Dgatling.resultsFolder with "/true" appended. It appears to not make any difference if I use a trailing space or not, nor does it make any difference if I use an absolute path or not (i.e. -Dgatling.resultsFolder=mycombosimulation-1521127678547), neither does using single or double quotes around the path help.

09:37:36 [INFO] 09:37:36.681 a.e.s.Slf4jLogger - Slf4jLogger started
09:37:36 Parsing log file(s)...
09:37:36 java.lang.reflect.InvocationTargetException
09:37:36 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:37:36 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
09:37:36 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
09:37:36 at java.lang.reflect.Method.invoke(Method.java:498)
09:37:36 at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
09:37:36 at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
09:37:36 Caused by: java.lang.IllegalArgumentException: requirement failed: simulation directory '/var/lib/jenkins/workspace/my-combo-stresstest/target/gatling/mymentcombosimulation-1521127678547/true' doesn't exist
09:37:36 at scala.Predef$.require(Predef.scala:277)
09:37:36 at io.gatling.core.config.GatlingFiles$.simulationLogDirectory(GatlingFiles.scala:49)
09:37:36 at io.gatling.charts.stats.LogFileReader.<init>(LogFileReader.scala:50)
09:37:36 at io.gatling.app.RunResultProcessor.initLogFileReader(RunResultProcessor.scala:67)
09:37:36 at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:49)
09:37:36 at io.gatling.app.Gatling$.start(Gatling.scala:77)
09:37:36 at io.gatling.app.Gatling$.fromArgs(Gatling.scala:44)
09:37:36 at io.gatling.app.Gatling$.main(Gatling.scala:36)
09:37:36 at io.gatling.app.Gatling.main(Gatling.scala)
09:37:36 ... 6 more

Does anyone have any idea what I could do to get around this? Maven versions 3.3.9, 3.5.2 and 3.5.3 have all been tested with exactly the same result.


Best regards,
Håkan

Håkan

unread,
Mar 16, 2018, 4:56:33 AM3/16/18
to Gatling User Group
gatling-maven plugin is 3.0.0-SNAPSHOT and I have run maven with the -U parameter to make sure everything is up to date.

Stéphane LANDELLE

unread,
Mar 16, 2018, 5:08:07 AM3/16/18
to gat...@googlegroups.com
Hi,

Do you compile Gatling 3 on your side, or do you fetch SNAPSHOTs from Sonatype's repo?
If the former, you're using old ones as they are no longer properly deployed, see https://github.com/gatling/gatling/issues/3406

Then, could you provide a reproducer, please? Can you reproduce locally without Jenkins?


Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Håkan

unread,
Mar 16, 2018, 8:55:21 AM3/16/18
to Gatling User Group
Hi Stéphane,

The issue is the same when running maven from the command line, without Jenkins.

Thanks for the heads up about the Sonatype repo. I wasn't aware of the SBT issue, but I will build locally and report back.

To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.

Håkan

unread,
Mar 16, 2018, 9:36:47 AM3/16/18
to Gatling User Group
Locally compiled it doesn't play well with the base examples from the maven-plugin demo project.

INFO] 14:28:14.951 i.g.c.ZincCompiler$ - Compiling 11 Scala sources to /var/lib/jenkins/workspace/my-combo-stresstest/target/test-classes ...
[ERROR] 14:28:17.254 i.g.c.ZincCompiler$ - /var/lib/jenkins/workspace/my-combo-stresstest/src/test/scala/Engine.scala:7:10: value dataDirectory is not a member of io.gatling.core.config.GatlingPropertiesBuilder
possible cause: maybe a semicolon is missing before `value dataDirectory'?
        .dataDirectory(IDEPathHelper.dataDirectory.toString)
         ^
[ERROR] 14:28:17.445 i.g.c.ZincCompiler$ - /var/lib/jenkins/workspace/my-combo-stresstest/src/test/scala/Recorder.scala:7:8: value simulationOutputFolder is not a member of io.gatling.recorder.config.RecorderPropertiesBuilder
        props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString)
              ^
[ERROR] 14:28:17.450 i.g.c.ZincCompiler$ - /var/lib/jenkins/workspace/my-combo-stresstest/src/test/scala/Recorder.scala:9:8: value bodiesFolder is not a member of io.gatling.recorder.config.RecorderPropertiesBuilder
        props.bodiesFolder(IDEPathHelper.bodiesDirectory.toString)
              ^
[ERROR] 14:28:20.027 i.g.c.ZincCompiler$ - three errors found
[ERROR] 14:28:20.029 i.g.c.ZincCompiler$ - Compilation crashed

Stéphane LANDELLE

unread,
Mar 16, 2018, 10:31:33 AM3/16/18
to gat...@googlegroups.com
Have a look at the fl branch

Stéphane Landelle
GatlingCorp CEO


To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.

Håkan

unread,
Mar 16, 2018, 12:39:32 PM3/16/18
to Gatling User Group
Thanks for your prompt reply, Stéphane.

It now builds again, but the error itself persists: The (verified existing path) gets /true appended to it somehow.

Executed from the command line with maven 3.5.3, like this:
mvn gatling:execute -Dgatling.reportsOnly -Dgatling.resultsFolder=/var/lib/jenkins/workspace/my-combo-stresstest/target/gatling/mycombosimulation-1521127678547

And the error itself:
Parsing log file(s)...
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
        at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.IllegalArgumentException: requirement failed: simulation directory '/var/lib/jenkins/workspace/my-combo-stresstest/target/gatling/mycombosimulation-1521127678547/true' doesn't exist
        at scala.Predef$.require(Predef.scala:277)
        at io.gatling.core.config.GatlingFiles$.simulationLogDirectory(GatlingFiles.scala:49)
        at io.gatling.charts.stats.LogFileReader.<init>(LogFileReader.scala:51)
        at io.gatling.app.RunResultProcessor.initLogFileReader(RunResultProcessor.scala:68)
        at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:50)
        at io.gatling.app.Gatling$.start(Gatling.scala:82)
        at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)
        at io.gatling.app.Gatling$.main(Gatling.scala:39)
        at io.gatling.app.Gatling.main(Gatling.scala)
        ... 6 more

Can you reproduce it?

Stéphane LANDELLE

unread,
Mar 16, 2018, 1:06:40 PM3/16/18
to gat...@googlegroups.com
OK, the problem is a misusage, the proper command is:

gatling:execute -Dgatling.reportsOnly=mycombosimulation-1521127678547 -Dgatling.resultsFolder=/var/lib/jenkins/workspace/my-combo-stresstest/target/gatling/

Stéphane Landelle
GatlingCorp CEO


To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.

Håkan

unread,
Mar 16, 2018, 2:06:27 PM3/16/18
to Gatling User Group
You're absolutely right, it was a PEBKAC error just as I suspected.

Thank you very much. Perhaps I should help other confused users by helping document the usage of the maven plugin...

Stéphane LANDELLE

unread,
Mar 16, 2018, 4:15:13 PM3/16/18
to gat...@googlegroups.com

Stéphane Landelle
GatlingCorp CEO


To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages