title: Passing command line parameters in gatling sbt project
body: <p>I am want to pass the ramp up users, throttle Duration, hold duration etc using command line parameters in a gatling sbt project.</p>
  
  <p><strong>for example:</strong></p>
  
  <pre><code>val rampUpUserCount  =  Integer.parseInt(System.getProperty("rampUpUsers"))
  val rampUpDuration = Integer.getInteger(System.getProperty("rampUpDuration"))
  </code></pre>
  
  <p>In the test I am doing</p>
  
  <pre><code>setUp(
      test.homePageScenario.inject(
        nothingFor(10 seconds),
        rampUsers(rampUpUserCount) over (rampUpDurationInMins minutes)
  ))
  </code></pre>
  
  <p>and from command line when I pass </p>
  
  <pre><code> sbt gatling:testOnly simulations.test.gateway -DrampUpUsers=200 -DrampUpDuration=20
  </code></pre>
  
  <p>I am getting <code>NumberFormatException</code></p>
  
  <pre><code>16:28:44.570 [INFO ] a.e.s.Slf4jLogger - Slf4jLogger started
  [error] java.lang.NumberFormatException: null
  [error]     at java.lang.Integer.parseInt(Integer.java:542)
  [error]     at java.lang.Integer.parseInt(Integer.java:615)
  [error]     at simulations.SimulationConfig.$init$(SimulationConfig.scala:185)
  [error]     at simulations.engineGateway.GetRecsFromThinkGateway.&lt;init&gt;(GetRecsFromThinkGateway.scala:10)
  [error]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  [error]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  [error]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  [error]     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  [error]     at java.lang.Class.newInstance(Class.java:442)
  [error]     at io.gatling.app.Runner.run0(Runner.scala:79)
  [error]     at io.gatling.app.Runner.run(Runner.scala:64)
  [error]     at io.gatling.app.Gatling$.start(Gatling.scala:59)
  [error]     at io.gatling.app.Gatling$.fromArgs(Gatling.scala:43)
  [error]     at io.gatling.sbt.GatlingTask.liftedTree1$1(GatlingTask.scala:51)
  [error]     at io.gatling.sbt.GatlingTask.execute(GatlingTask.scala:50)
  [error]     at sbt.ForkMain$Run$2.call(ForkMain.java:296)
  [error]     at sbt.ForkMain$Run$2.call(ForkMain.java:286)
  [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  [error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  [error]     at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>Please can someone help me with this? 
  Thanks</p>