Migrating from 2.0.0-M3a to 2.0
Global changes
Gatling requires at least JDK7u6
As targeting newer JDKs provides bug fixes, speed improvements and opens opportunities for optimization, Gatling now requires at least a JDK7u6 (released almost two years ago already).
Gatling is now available on Maven Central
Gatling releases are now available on Maven Central, and snapshots are deployed on each successful build by Travis CI to Sonatype’s snapshots repository.
If you were using Gatling with its Maven plugin, you no longer need to add the Excilys repository in your pom.xml
.
Simulation
Necessary imports
import bootstrap._
andimport assertions._
are now unnecessary and have to be removed.import io.gatling.http.Headers.Names._
is now unnecessary, headers names are now directly available fromHeaderNames
.import io.gatling.http.Headers.Values._
is now unnecessary, headers values are now directly available fromHeaderValues
.
Injection DSL
ramp(10 users)
becomesrampUsers(10)
heaviside(10 users)
becomesheavideUsers(10)
atOnce(10 users)
becomesatOnceUsers(10)
constantRate(10 usersPerSec)
becomesconstantUsersPerSec(10)
rampRate(10 usersPerSec)
becomesrampUsersPerSec(10)
split(10 users)
becomessplitUsers(10)
Core
Structure Elements
In asLongAs
, exitASAP
now defaults to true. For more information on the change of behaviour it introduces, see asLongAs documentation.
Checks
whatever
has been renamed tooptional
.transform
now no longer takes and returns anOption[T]
and takes and returns plain types, buttransformOption
provides the same functionality astransform
did.
HTTP
Form parameters (for POST requests)
Renamed
Methods for adding form parameters to the request have been renamed:
param
=>formParam
multiValuedParam
=>multiValuedFormParam
Misc
requestInfoExtractor
andresponseInfoExtractor
have been merged into a singleextraInfoExtractor
, which takes aExtraInfo => List[Any]
function.gatling.http.ahc.useRawUrl
configuration parameter was removed, please usedisableUrlEncoding
instead, as described here.
For more information on extraInfoExtractor
, please refer to its documentation.
Logs
simulation.log
has been redesigned.
If you wrote your own specific simulation.log
parser, you’ll need to migrate it to the new structure.
Recorder
Until now, when setting up the Recorder, you had to setup two ports for the Recorder’s local proxy: one for HTTP, one for HTTPS. This is not needed anymore, as the Recorder handles itself the switch to an HTTPS connection if necessary, and only a single port needs to be specified.
Maven Plugin
The <includes>...</includes>
and <excludes>...</excludes>
configuration options have been removed.
Should you want to select a specific simulation to run, you can use the <simulationClass>...</simulationClass>
config option to do so.
For more information, see the Maven plugin documentation.