Set environment variable in Gatling plugin

Hi all,

I’m using Gatling plugin


Where in my Java Simulation I’m trying to get some environment variables using


For now I tried several things without success like add in the plugin


Any idea how to accomplish this?


This is a standard Java question, really not related to Gatling.

You’re confusing environment variables and Java System Properties.

You have to use System.getProperty(key) .

Thanks for the answer, I need to get environment variable from Java, also the code that grab this env var is not part of my code, but an external library so System.getenv(key) is mandatory

I just use simulationSystemProperties since it was the only thing that I saw in the plugin.

Any way to set environment variables in the plugin?

Environment variables are process context properties that get automatically propagated to children processes. This is not the case for Java System properties, hence simulationSystemProperties to be able to set system props for the child Java Gatling process and propagateSystemProperties to have maven system props transferred.

Do a export DELAY_SERVICE_NAME=bla before launching your maven process.

We don’t provide a way to set env vars.

Thank you to confirm.