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.(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.
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?
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
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.(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