Use sytem property from maven inside gatling simulation


I am new to Gatling and Scala so forgive me if this question seems obvious.

I am trying to set a system property inside my maven pom file and use it inside my Gatling simulation. I was not able to make this work.

In Java I would do this by using the maven-surefire-plugin defining my variable inside the block like this




So I tried to do the same thing but it did not work.

I also tried to set this property on Gatling & Scala plugin the same way without success.

For information, in my scala gatling simulation I tried to retrieve the property value with the following code (again I am new to scala so I tried every possible way I found, just to be sure that the pb was not coming from my scala code).

val myProp = sys.env.get("") val props = System.getProperties() val myProp2 = props.get("") val myProp3 = System.getenv("") val myProp4 = System.getProperty("") val myProp5 = scala.util.Properties.envOrElse("", "not found 5" )

Anyone would be able to show me the right way of doing this ?