Jenkins Plugin : a few issues


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] ------------------------------------------------------------------------
[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]( 0
	at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReport(](
	at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(](
	at [hudson.tasks.BuildStepMonitor$3.perform(]($3.perform&entity=method)
	at [hudson.model.AbstractBuild$AbstractBuildExecution.perform(]($AbstractBuildExecution.perform&entity=method)
	at [hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(]($AbstractBuildExecution.performAllBuildSteps&entity=method)
	at [hudson.model.Build$BuildExecution.post2(]($BuildExecution.post2&entity=method)
	at [hudson.model.AbstractBuild$]($
	at [hudson.model.Run.execute(](
	at [](
	at [hudson.model.ResourceController.execute(](
	at [](

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] ------------------------------------------------------------------------
[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
[]( 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 Method)
	at com.fasterxml.jackson.core.JsonFactory.createJsonParser(
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(
	at com.excilys.ebi.gatling.jenkins.SimulationReport.readStatsFile(
	at com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(
	at hudson.tasks.BuildStepMonitor$3.perform(
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(
	at hudson.model.Build$BuildExecution.post2(
	at hudson.model.AbstractBuild$
	at hudson.model.Run.execute(
	at hudson.model.ResourceController.execute(

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?


PS : I also have another question : is there a way to easily configure the baseUrl from maven command-line ?


I’ll just answer the last question and let the rest for the rest of the team in France :wink:



Thanks for the quick reply!

One thing to add though, in case someone tries the same thing
I tried adding

val baseUrl = System.getProperty(“server.url”)
val httpConf = httpConfig

Can you send us your maven plugin & Jenkins configuration please ?

The pom.xml of the gatling tests project :

For the Jenkins plugin, I retrieved the source from github today and compiled them on my desktop with Java 1.7 and Maven3.0.4

As for the Jenkins configuration, I don’t really know what you’d need as information, so…:

  • version 1.490
  • Master is running on CentOS 64bit,
  • java version :
java.version 1.7.0_07 mixed mode Java HotSpot™ 64-Bit Server VM
  • Maven version : 3.0.4
  • execution on both the master node (linux case) and a windowsXP slave (Java1.6 in this case, I could upgrade it if needed)

Do you need any other information?

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.

Where did you find reference to that massloginsimuation (without L) ?
The simulation scala class is actually named MassLoginSimulation (with an L)

Here’s my Jenkins job configuration, the simulation name is passed as parameter

And in case it might be usefull, here’s the scala file

PS :
What do you mean by Gatling Plugin ?
Jenkins’ plugin, Maven’s plugin ? ^^" it’s a bit confusing

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 :slight_smile:

Can you try setting the “Output directory prefix” field to massloginsimulation and try to build again ?

Oops, my bad, I should have read the field description more thoroughly. Thanks for the tip!

I’ve completed my configuration as requested, setting the output directory prefix to : em.prt.web.test.gatling/target/gatling/massloginsimulation

The job on Linux works fine !
However, there is a small hiccup on the graph display, the legend pops up over the graph, making it nearly unreadable
Here’s the screenshot :

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
[]( 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. )

Damn, apparently my last message got deleted.

In the job pages,

when I click on the link, it redirects to the main job page…
My guess is that it should redirect to the usual Gatling report. ^^"

What am I missing this time ?

Regarding the Windows bug, might it be that the file is created asynchronously and doesn’t exist yet?

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).

So I’ve changed output directory proxy to just : “massloginsimulation”,
but i still have the same issue.

I also tried putting a 60s sleep between the end of the gatling test and the gatling jenkins plugin,
that didn’t fix the error neither. =/

BTW, I’ve also tested on Linux with the output directory prefix to just “massloginsimulation”,
and the link to the Gatling report is fixed. :slight_smile:

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 :slight_smile:

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. <_< )

That would be great if you can run the job on a Linux slave, I can confirm my hypothesis that way.

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] ------------------------------------------------------------------------
[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
[]( /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)

That’s not exactly the same exception :slight_smile:
This time, The file is here, but you don’t have the correct permissions to access it.