I want to be able to pass parameters to a Gatling Simulation from a java code and specially the url of test. I use Gatling with maven method. Someone help me please.
one way would be: for example, i need to pass the URL under the test http://127.0.0.1:5000
mvn clean gatling:test -Dfoo="http://127.0.0.1:5000"
to pick this variable in scala code:
val foo_url = System.getProperty("foo")
and to utilize this foo_url in simulation:
val httpProtocol = http //.baseUrl("http://127.0.0.1:5000") .baseUrl(foo_url)