Development Environment - krishnenc/gatling GitHub Wiki
As we chose to push Gatling on Github, it is likely that other people will want to see how we did it, and hopefully help us; the aim of this page is to ease the "get-into-developing-gatling" process. To know how you can contribute to Gatling, visit Contributing.
- Java Development Kit 6 or later.
- Git 1.7 or later. (really ? ;))
- Eclipse 3.6 (Helios) or later. We recommend Eclipse 3.7 (Indigo) as the Maven integration is better.
- Scala IDE plugin. Update Site: http://download.scala-ide.org/releases-29/stable/site
- Maven Integration for Eclipse Plugin. Update Site:
- Eclipse 3.7: Indigo Update Site > Collaboration > m2e
- Eclipse 3.6: http://m2eclipse.sonatype.org/sites/m2e
- Maven Integration for Scala Plugin. Update Site: http://alchim31.free.fr/m2e-scala/update-site
Once every software is installed, you can import Gatling project into Eclipse. Doing so is really easy:
- Open Eclipse
- Click on File > Import... > Maven > Existing Maven Project
- Select gatling folder
- Finish the import
- Repeat the process for gatling-highcharts
- All Done !
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.
As a developer, you'll want to run Gatling from Eclipse, sparing the long process of tarball creation. These are the steps required:
Note:
GATLING_HOMEis, from a developer point of view, the folder in which you'll find the folders: assets, bin, results, etc. It could be defined as follows:GATLING_HOME=${where-you-cloned-gatling}/gatling/gatling-bundle/src/main/assembly/assembly-structure
-
Create a new running configuration in the Scala Application category
-
Choose a name, Gatling is a good one
-
Select the gatling-app project and the class com.excilys.ebi.gatling.app.Gatling as the main class
-
Add these arguments in the VM options:
-XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms512M -Xmx512M -Xmn100M -Xss512k -XX:+HeapDumpOnOutOfMemoryError -XX:+AggressiveOpts -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly
-
Set
GATLING_HOMEin the environment tab -
Add the folder
$GATLING_HOME/confto the classpath beforegatling-app -
Add the project
gatling-charts-highchartsto the classpath beforegatling-app -
Ready to launch !
Another set of tools can be appreciated if you want to test things and, for example, package Gatling as an archive.
- Scala. Installing Scala on your computer will allow you to use the REPL. This is the Scala interpreter, you can use it to test pieces of code and so on.
- Maven. Having the maven integration plugin in Eclipse is enough to import the project and manage dependencies; but if you want to package Gatling or test that the mvn clean install process actually works, you'll need it installed on your computer as well.
- Git tools. To help you working with Git, you can use different software. EGit is an integration of Git in Eclipse, it is included in Eclipse Indigo's Update Site.