Gatling maven project in Intellij

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.

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

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

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.

!intellij-new-scala.png|932x514

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