So, now that I have a few scenarios running and generating reports, I’m moving the execution to Jenkins. =)
My configuration:
execution of Gatling through maven3 (nice job with the gatling plugin BTW)
Gatling version : 1.4.0-SNAPSHOT
Gatling plugin version : 1.4.0-SNAPSHOT
(both are retrieved by maven3 from the snapshot repository)
When running the maven target through Jenkins, the test itself runs just fine.
But the publishing of the report fails, with a different error whether I run the job on WindowsXP or Linux (CentOS 64bit)
On Linux :
[INFO] Please open the following file : /home/.jenkins/jobs/em.cmn_Test_Gatling_MassLogin/workspace/em.prt.web.test.gatling/target/gatling/massloginsimulation-20121115102929/index.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:15.648s
[INFO] Finished at: Thu Nov 15 10:33:22 CET 2012
[INFO] Final Memory: 9M/80M
[INFO] ------------------------------------------------------------------------
ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
[java.lang.ArrayIndexOutOfBoundsException](http://stacktrace.jenkins-ci.org/search?query=java.lang.ArrayIndexOutOfBoundsException): 0
at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReport(GatlingPublisher.java:106)](http://stacktrace.jenkins-ci.org/search/?query=com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReport&entity=method)
at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(GatlingPublisher.java:61)](http://stacktrace.jenkins-ci.org/search/?query=com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform&entity=method)
at [hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)](http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$3.perform&entity=method)
at [hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method)
at [hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps&entity=method)
at [hudson.model.Build$BuildExecution.post2(Build.java:183)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.post2&entity=method)
at [hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.post&entity=method)
at [hudson.model.Run.execute(Run.java:1541)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method)
at [hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method)
at [hudson.model.ResourceController.execute(ResourceController.java:88)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method)
at [hudson.model.Executor.run(Executor.java:236)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method)
On Windows XP:
[INFO] Please open the following file : C:\jenkins\workspace\em.cmn_Test_Gatling_MassLogin\em.prt.web.test.gatling\target\gatling\massloginsimulation-20121115101052\index.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:09.078s
[INFO] Finished at: Thu Nov 15 10:14:41 CET 2012
[INFO] Final Memory: 5M/14M
[INFO] ------------------------------------------------------------------------
ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
[java.io.FileNotFoundException](http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException): C:\jenkins\workspace\em.cmn_Test_Gatling_MassLogin\em.prt.web.test.gatling\target\gatling\massloginsimulation-20121115101052\js\global_stats.json (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.fasterxml.jackson.core.JsonFactory.createJsonParser(JsonFactory.java:501)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1766)
at com.excilys.ebi.gatling.jenkins.SimulationReport.readStatsFile(SimulationReport.java:48)
at com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(GatlingPublisher.java:50)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1541)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Of course, for the WindowsXP case, I've checked that the specified folder does exist by copy-pasting the path into windows explorer.
Anyone has any idea of what I could have missed?
cheers,
Josselin
PS : I also have another question : is there a way to easily configure the baseUrl from maven command-line ?
Can you give your Gatling plugin config too (simulation name, etc…)
My first guess concerning your problem is that you didn’t properly the simulation name in the Gatling plugin configuration (in your case, massloginsimulation).
Can you confirm it’s massloginsimuation ? I admit it’s kinda confusing, and it’s something we’ll have to fix before releasing the stable version.
Sorry, typing error, it’s massloginsimulation.
I see now what’s wrong in your config : in the “Output directory prefix”, you must indicate the basename of your results folder.
For example, when you ran your simulation on Linux, your report was saved in a folder named massloginsimulation-2012****1115102929, so the prefix is massloginsimulation.
And I was talking about Gatling Jenkins Plugin
Can you try setting the “Output directory prefix” field to massloginsimulation and try to build again ?
On WindowsXP, running with the exact same configuration,
I still get the same error :
ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
[java.io.FileNotFoundException](http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException): C:\jenkins\workspace\em.cmn_Test_Gatling_MassLogin-WindowsXP\em.prt.web.test.gatling\target\gatling\massloginsimulation-20121115125335\js\global_stats.json (No such file or directory)
( When copy-pasting the path into windows explorer, I do find this file. )
You don’t need to specify the entire path to your results folder, massloginsimulation is enough.
If you delete em.prt.web.test.gatling\target\gatling from your path in the “ouput directory prefix”, the graph will be more readable (because of the shorter name).
It’s probably messing with Windows and breaks your link to the report too (the slashes are not escaped, leading to a non-existing URL, and Jenkins probably redirects 404s to the job main page).
I think the Gatling Jenkins plugin doesn’t handle very well distributed Jenkins configurations… Proof is that it works well on Linux, your master node but fails on a slave node.
We’ll look at that.
It’s great though that you managed to get rid of most of your problems with the plugin
I can try running the job on a linux slave, if you want me to.
The only thing that keeps bothering me here is that my Master node and my Websphere server are two VM running on the same relatively-weak physical server that is already a bit overloaded.
Not the best way to test performances IMHO. =/
( and don’t tell me that putting a Jenkins inside a VM on a weak server is a bad idea, I know, but my teamleader doesn’t seem to understand that. <_< )
Running the same job on a slave installed on the same linux than the master node (yeah I know, it’s a kinda dirty trick),
so it’s the exact same environment than master.
And I do have the same exception. =)
[INFO] Please open the following file : /home/jenkinsSlave/workspace/em.cmn_Test_Gatling_MassLogin-Linux-master-wrapper/em.prt.web.test.gatling/target/gatling/massloginsimulation-20121115163940/index.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:49.396s
[INFO] Finished at: Thu Nov 15 16:49:52 CET 2012
[INFO] Final Memory: 7M/132M
[INFO] ------------------------------------------------------------------------
ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
[java.io.FileNotFoundException](http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException): /home/jenkinsSlave/workspace/em.cmn_Test_Gatling_MassLogin-Linux-master-wrapper/em.prt.web.test.gatling/target/gatling/massloginsimulation-20121115163940/js/global_stats.json (Permission denied)