Use sytem property from maven inside gatling simulation

Hello,

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

`



<my.property>myValue</my.property>

`

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("my.property") val props = System.getProperties() val myProp2 = props.get("my.property") val myProp3 = System.getenv("my.property") val myProp4 = System.getProperty("my.property") val myProp5 = scala.util.Properties.envOrElse("my.property", "not found 5" )

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

Thx