Environment variables
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.
In order to retrieve a system environment variable in JMeter you can refer to the variable in your script as follows:
${__P("VARIABLE")}
In Scala, you are able to refer to the variable as follows:
sys.env.get("VARIABLE")
This will return an Option[String].
ENV.VARIABLE
Note that with Element you'll also have to import ENV like this:
import { step, TestSettings, Until, By, Browser, TestData, ENV } from '@flood/element'
The following environment variables will also be set across all tools.
FLOOD_GRID_REGION=us-east-1
The canonical AWS region in which the grid is located.
FLOOD_GRID_SEQUENCE_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.
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
Last modified 3yr ago