Gatling maven project in Intellij

602 views
Skip to first unread message

Shiri Eisenberg

unread,
Nov 12, 2014, 3:20:20 AM11/12/14
to gat...@googlegroups.com
Hi, I'm new to gatling. I'm trying to work with it on Intellij using the maven plugin.
I have scala and sbt plugins installed on my intellij.
I downloaded the gatliong-maven-plugin-demo from github and opened it in intellij. this works fine.
My question is - now how do I add my own scala script to the project? (I tried to add a script but when I tried to run it I got  - The request class('someTest/MyTest') can not be found in the classpath.

Pierre DAL-PRA

unread,
Nov 12, 2014, 3:26:01 AM11/12/14
to gat...@googlegroups.com
Hi,

Where did you put your simulations ? 
As in the the gatling-maven-plugin-demo project, your simulation must be in src/test/scala.
Also, when specifying which simulation to run, use the name of the class (someTest.MyTest if your MyTest simulation is in the someTest package), not the path of the simulation class in your project.

Cheers,

Pierre

--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shiri Eisenberg

unread,
Nov 12, 2014, 5:24:05 AM11/12/14
to gat...@googlegroups.com
I added my script on the same project, added the new file under /src/test/scala/someTest .
My problem is - 
1) when I wanted to created a new scala file, when choosing "new" (right click on the "scala" directory) I don't have an option for Scala object, just scala script or scala worksheet. I chose scala script. when looking at the files themselves (not via intellij) I see that the original script is of type Unix Executable file and mine is of type Document. I assume I need to compile/re-build the project or something of that sort?  (I'm working on mac if it makes a difference)
2) I tried to run mvn clean install and I get the message - [ERROR] More than 1 simulation to run, need to specify one

Stéphane Landelle

unread,
Nov 12, 2014, 5:30:07 AM11/12/14
to gat...@googlegroups.com

1) when I wanted to created a new scala file, when choosing "new" (right click on the "scala" directory) I don't have an option for Scala object, just scala script or scala worksheet.


Images intégrées 1

Pierre DAL-PRA

unread,
Nov 12, 2014, 5:32:58 AM11/12/14
to gat...@googlegroups.com
On 12 November 2014 11:24, Shiri Eisenberg <shiri...@gmail.com> wrote:
I added my script on the same project, added the new file under /src/test/scala/someTest .
My problem is - 
1) when I wanted to created a new scala file, when choosing "new" (right click on the "scala" directory) I don't have an option for Scala object, just scala script or scala worksheet. I chose scala script. when looking at the files themselves (not via intellij) I see that the original script is of type Unix Executable file and mine is of type Document. I assume I need to compile/re-build the project or something of that sort?  (I'm working on mac if it makes a difference)

There is obviously something wrong in your IntelliJ setup. make sure that you're using a recent version of both IntelliJ and the official  Scala plugin. Also uninstall SBT plugins for IntelliJ, the SBT support of the official Scala Plugin is more than sufficient.

2) I tried to run mvn clean install and I get the message - [ERROR] More than 1 simulation to run, need to specify one


 If there is more than one simulation is src/test/scala, You'll need to configure a Maven "execution" for each simulation. Please refer to the Maven Plugin documentation : http://gatling.io/docs/2.0.2/extensions/maven_plugin.html
Reply all
Reply to author
Forward
0 new messages