Maven plugin - krishnenc/gatling GitHub Wiki

Contributed by @nhuray.

Thanks to this plugin, Gatling can be launched when building your project, for example with your favorite CI solution.

Set up the repositories #

Gatling depends on libraries that are either hosted on maven central, or on Excilys Nexus.

Depending on your maven architecture, you might have to:

  • add the Excilys repository into your project's pom.xml if you're fine with downloading your dependencies from the internet. In this case, here's the required configuration:
<repositories>
    <repository>
        <id>excilys</id>
        <name>Excilys Repository</name>
        <url>http://repository.excilys.com/content/groups/public</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>excilys</id>
        <name>Excilys Repository</name>
        <url>http://repository.excilys.com/content/groups/public</url>
    </pluginRepository>
</pluginRepositories>
  • add a proxy on Excilys repository into your enterprise maven repository (Nexus, Artifactory, Archiva...)
  • manually download and install the dependencies into your enterprise repository if you can't/don't want to add a proxy

Set up the gatling-maven-plugin#

<plugin>
    <groupId>com.excilys.ebi.gatling</groupId>
        <artifactId>gatling-maven-plugin</artifactId>
        <version>X.Y.Z</version>
    <dependencies>
    <dependency>
        <groupId>com.excilys.ebi.gatling.highcharts</groupId>
        <artifactId>gatling-charts-highcharts</artifactId>
        <version>X.Y.Z</version>
</dependency>
</dependencies>
</plugin>

Note: as the Highcharts based reports library is developed as a separate project, you are required to provide it to the plugin as a dependency

Optional advanced configuration

The example below shows the default values.

<configuration>
    <configFile>src/main/resources/gatling.conf</configFile>
    <dataFolder>src/main/resources/data</dataFolder>
    <resultsFolder>target/gatling</resultsFolder>
    <requestBodiesFolder>src/main/resources/request-bodies</requestBodiesFolder>
    <simulationsFolder>src/main/resources/simulations</simulationsFolder>
    <includes>
        <include>**/*.scala</include>
    </includes>
    <excludes>
        <exclude>advanced/*.scala</exclude>
    </excludes>
<!--     <noReports>false</noReports> -->
<!-- 	<reportsOnly>false</reportsOnly> -->
<!-- 	<simulations>foo.Bar,foo.Baz</simulations> -->
<!-- 	<jvmArgs>-DmyExtraParam=foo</jvmArgs> -->
<!-- 	<failOnError>true</failOnError> -->
</configuration>

See source code for more documentation.

Sample #

See sample project here.

⚠️ **GitHub.com Fallback** ⚠️