At the start of your Flood we will initialise 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 Example

In order to retrieve a system environment variable in Jmeter you can refer to the variable in your script as follows:

${__P("VARIABLE")}

Gatling Example

In Scala, you are able to refer to the variable as follows:

sys.env.get("VARIABLE")

This will return an Option[String].

Environment Variables

The following environment variables will also be set.

FLOOD_GRID_REGION=us-east-1

The canonical AWS region in which the grid is located

FLOOD_GRID_SQEUENCE_ID=N

The grid's sequential ID expressed as an integer for your account.

FLOOD_GRID_NODE_SEQUENCE_ID=N

The grid node's sequential ID expressed as an integer for your account.

FLOOD_GRID_INDEX=N

A zero based index to indicate which grid the flood is running on based on the total number of grids the flood is distributed to.

FLOOD_NODE_INDEX=N

A zero based index to indicate which node of a grid the flood is running on based on the total number of nodes in any particular grid the flood is distributed to. 

FLOOD_SEQUENCE_ID=N

The flood's sequential ID expressed as an integer for your account.

FLOOD_PROJECT_ID=N

The flood's project ID expressed as an integer for your account.

THREAD_ID=N

For Selenium tests, a one based index to indicate the browser / thread ID, expressed as an integer.

System Properties

In particular, the following system properties are set at the start of your test:

-Dgrid_index=N

grid_index is a zero based index to indicate which grid the flood is running on based on the total number of grids the flood is distributed to. 

-Dnode_index=N

node_index is a zero based index to indicate which node of a grid the flood is running on based on the total number of nodes in any particular grid the flood is distributed to. 

-Dthreads=N

threads is an integer value that corresponds to the threads parameter you set in the Flood user interface.

-Drampup=N

rampup is an integer value that corresponds to the rampup parameter you set in the Flood user interface, expressed as seconds.

-Dduration=N

duration is an integer value that corresponds to the duration parameter you set in the Flood user interface, expressed as seconds.

Note: these same properties are expressed as JMeter properties at run time

e.g. -Jthreads=100 

Did this answer your question?