Gatling can't be called using system properties?

555 views
Skip to first unread message

Danny Lade

unread,
Dec 6, 2012, 1:46:37 PM12/6/12
to gat...@googlegroups.com
I tried to configure parts of my scenario with setting a system property.

1. calling "gatling.bat -Dloadtest.conf=foo.conf" results in 

  Error: Unknown argument '-Dloadtest.conf' 
  Error: Unknown argument 'foo'

2. calling "mvn gatling:execute -Dloadtest.config=foo.conf" does not set the system property "loadtest.config" too (see System.getProperties())

One of the most useful thing is to set a "username" or "password" from command line (instead of storing them in a config file).

Regards Danny

Stéphane Landelle

unread,
Dec 7, 2012, 1:49:23 AM12/7/12
to gat...@googlegroups.com
1. open the script and you'll see that you have to set this up as a JAVA_OPTION env var before running it. The way you did it actually passes a -Dloadtest.conf to the Gatling class main method, which is not what you want.
2. gatling is executed is another JVM, so you have to set System properties in the plugin configuration (there's a jvmArgs option).

Cheers,

Stéphane
Reply all
Reply to author
Forward
0 new messages