At the start of your flood we will initialize some environment variables and system properties which can be of use when designing your tests.
In addition to the following system properties and environment variables, you can also pass in your own environment variables by uploading a KEY=VALUE format text file called environment (with no file extension) along with your other test assets.
Some further guidelines about syntax and configuration:
each line in an env file to be in VAR=VAL format.
Lines beginning with # (i.e. comments) are ignored.
Blank lines are ignored.
There is no special handling of quotation marks.
Please do not use special characters such as periods (.) in the variable name.
Please do not upload a conf/gatling.conf file in your user files as this will override the node's own configuration and most likely break the reporting plugin (by not specifying the correct writers). If there's something you need in there just let us know.
When providing an environment file, this is loaded into the container's OS environment the same as any system environment variable. So these aren't JVM properties / parameters, rather they are system environment variables.
JMeter Environment Example
In order to retrieve a system environment variable in JMeter you can refer to the variable in your script as follows:
Gatling Environment Example
In Scala, you are able to refer to the variable as follows:
This will return an Option[String].
Element Environment Example
Note that with Element you'll also have to import ENV like this: