Follow the steps described at Gradle Plugin Portal page.
- Java 8 Upgrade
-
-
Due to a bug Gatling 2.2.0 is supported only from gradle-gatling-plugin version 0.3.0
-
JDK 8 is required for Gatling 2.2.0, so this plugin is also require JDK8
-
For whatever reason you stuck with JDK 7, please keep using the 0.2.x series of this plugin.
Plugin supports two source files layouts for Gatling
simulations and related data.
-
Standard Gradle/Maven layout
-
Gatling-like layout
There’s no need to explicitly setup any of those. Plugin auto-detects layout during examination of project’s folder structure.
Directory | Meaning |
---|---|
|
Simulation sources |
|
Feeder data |
|
Request bodies |
|
Custom gatling configurations |
The plugin defines the following extension properties in the gatling
closure
Property name | Type | Default value | Description |
---|---|---|---|
toolVersion |
String |
'2.2.2' |
|
logLevel |
String |
'WARN' |
The default Gatling console log level if no |
jvmArgs |
List<String> |
['-server', '-XX:+UseThreadPriorities',
'-XX:ThreadPriorityPolicy=42',
'-Xms512M', '-Xmx512M', '-Xmn100M',
'-XX:+HeapDumpOnOutOfMemoryError',
'-XX:+AggressiveOpts',
'-XX:+OptimizeStringConcat',
'-XX:+UseFastAccessorMethods',
'-XX:+UseParNewGC',
'-XX:+UseConcMarkSweepGC',
'-XX:+CMSParallelRemarkEnabled',
'-Djava.net.preferIPv4Stack=true',
'-Djava.net.preferIPv6Addresses=false'] |
Additional arguments passed to JVM when executing |
simulations |
Closure or Iterable<String> |
{ include "**/*Simulation.scala" } |
Simulations filter. |
Plugin provides dedicated task GatlingRunTask
that is responsible for execute gatling simulations.
Customer may create instances of this task to execue particular simulations.
Task extends Gradle’s JavaExec
task.
Additionally plugin creates several default tasks
Task name | Type | Description |
---|---|---|
|
- |
Compiles |
|
GatlingRunTask |
Executes all |
|
GatlingRunTask |
Executes single |
This plugin defines two configurations gatlingCompile
and gatlingRuntime
.
By default plugins adds gatling
libraries and project’s classes and tests classes to gatlingCompile
configurations
Additional dependencies can be added by plugin’s users.