Custom config file name overriding from javaOption '-Dgatling.conf=gatling-perf2.conf'

Hi!

I have a problem. I need to override a gatling config file name for several environments. Now in other tests i use a construction like

val configName = Option(System.getProperty(“some.custom.config”)).getOrElse(defaultCustomConfigName)

And now i need use it with gatling.conf. can we do that?

private val GatlingConfigFile = “gatling.conf”
val customConfig = ConfigFactory.parseResources(classLoader, GatlingConfigFile)

V
private val GatlingConfigFile = Option(System.getProperty(“gatling.config”)).getOrElse(“gatling.conf”)
val customConfig = ConfigFactory.parseResources(classLoader, GatlingConfigFile)

Thanks,
Vaytsel Sergey

Hi again!

In the issue (https://github.com/gatling/gatling/issues/3181) I wanted to offer you to add to gatling a possibility for changing configuration file name by java option.
I know, that now it is not possible, but, maybe, we can add this feature, it can be very helpful not only for me but also for another gatling users.
What do you think about this?

By example, I want to run several tests, and in one test report I want to see one set of percentiles, and in another - another set.
Or (and this is an important thing for me) I want to overwrite a field gatling.data.graphite.rootPathPrefix for different tests.
Or, by example, field gatling.core.directory.data.

This is not good if a should use bash commands for copying files from one directory to another before each test.
Or, maybe, we can found another solution - some DSL, or something, where I can set this options for each test.

Please, let’s talk about this!

Thanks,
Vaytsel Sergey