I’m beginning to use Gatling and I would like to use Gatling in Eclipse but I’m having difficulties to setting up my development environment.
I was able to download Scala IDE and install mvn2 plugin but the next step is causing problems.
“Once every software is installed, you can import Gatling project into Eclipse. Doing so is really easy:”
What project is this referring to?
“Gatling is made to run as a standalone program, thus most users will want to download a tarball containing all the binaries required to execute Gatling.”
Where can I download the tarball?
Then there is “Installing the Maven Archetype” at IDE integration"
How I’m actually installing the archetype?
I fond this blog post http://blog.roddet.com/2012/05/gatling-integration-maven-eclipse/ and I was able to generate a sample maven Gatling project… But my project structure is different. Recorder class is not under src/main but src/test and when I try to run it as a Scala application I get an error:
Which version of Gatling do you use, and which version of Scala/Scala IDE?
As stated on all the wiki pages, instructions are for Gatling 1 and have to be adapted for Gatling 2.
Gatling 1: Scala 2.9
Gatling 2: Scala 2.10
=> make sure to pick the proper Scala IDE version to match your Gatling version
Yes, I guess that was the problem. I assumed I was using version 2.0+ of Gatling but now I see it is under development. I downloaded Eclipse Indigo and
update package for Scala from http://scala-ide.org/download/current.html. It was a package containing plugin and features folders and couple of jar files. I assumed I should copy them to my Eclipse root folder but I still can’t run Scala programs with the Eclipse. Something went wrong there but that is another problem I think I will be able to solve by myself but I will leave that for tomorrow. So thanks a lot for help
maanantai, 16. joulukuuta 2013 16.00.42 UTC+2 Stéphane Landelle kirjoitti:
Hi Henri!
You could always go the Gradle route, I found it simplified things massively for me. This is what my build.gradle file looks like (developing against 2.0.0 snapshots)
If I were you I’d go with the intellij community edition. Works smoothly. Great scala plugin. Generate a skeleton project using the archetype plugin, and open pom.xml. That’s about it.
Is there any ‘howto’ or something similar how to setup my development environment (especially for 2.0.0-SNAPSHOT)? I’ve already gatling 2.0.0-M3a up&running but I’m unable to do it with the snapshot builds. So what should I do if I want to switch from M3a to 2.0.0-SNAPSHOT?
mvn clean install
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gatling 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for io.gatling.net.sf.saxon:Saxon-HE:jar:9.5.1-2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.630s
[INFO] Finished at: Wed Dec 18 11:24:12 CET 2013
[INFO] Final Memory: 6M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project gatling: Could not resolve dependencies for project com.openexchange.test.performance:gatling:jar:1.0.0-SNAPSHOT: Failure to find io.gatling.net.sf.saxon:Saxon-HE:jar:9.5.1-2 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced → [Help 1]
@Janni, my first choice is maven but I’ll also have a look at gradle. Na’se kala
Niko, no probs
It’s not looking at the right repo for the artifact dependency. I would attempt to run mvn with the -U option to force it to force it to update snapshots.
Exactly: there’s an old snapshot in your local repo that was fetched in the last 24h from Cloudbees I guess. You have to run with -U to force the update.
Changed the repo in the pom.xml and tada the next exception
[ERROR] [12/18/2013 14:00:39.405] [GatlingSystem-akka.actor.default-dispatcher-9] [akka://GatlingSystem/user/$a] io.gatling.metrics.GraphiteDataWriter
java.lang.ClassNotFoundException: io.gatling.metrics.GraphiteDataWriter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at io.gatling.core.result.writer.DataWriter$$anonfun$1.apply(DataWriter.scala:45)
at io.gatling.core.result.writer.DataWriter$$anonfun$1.apply(DataWriter.scala:44)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:73)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at io.gatling.core.result.writer.DataWriter$.init(DataWriter.scala:44)
at io.gatling.core.controller.Controller$$anonfun$1.applyOrElse(Controller.scala:86)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
at akka.actor.ActorCell.invoke(ActorCell.scala:456)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Thanks for the suggestion but Gradle doesn’t ring any bells to me and right now I don’t have that much time to familiarize myself with it. But I got Eclipse working now with Scala plugin. I just screwed up my previous installation. All good now. I can run Recorder also
tiistai, 17. joulukuuta 2013 11.51.02 UTC+2 Ioannis Mavroukakis kirjoitti:
I have pulled this project GitHub - RallySoftware/gatling-with-gradle and have installed scala-IDE for eclipse and gradle plugins for Eclipse Luna version.
I have updated all Gatling dependencies also but still my eclipse not able to recognize “Simulation” etc Gatling specific DSL and build is failing with error
What went wrong:
Cannot infer Groovy class path because no Groovy Jar was found on class path: configuration ‘:compile’
Please have a look at attached build.gradle and logs file for more info.