2

I'd like to be able to run Gatling via SBT and parameterize the number of constant users per second and the total duration of the simulation.

Something like:

setUp(testScenario.inject(constantUsersPerSec(<parameter>) during(<number> <seconds|minutes|hours>))

What would be the best way to pass arguments to SBT and read them in the Simulation class?

Gabriel C
  • 1,012
  • 3
  • 12
  • 30

1 Answers1

1

You can try pass them as environment parameters

  val variable = Option(System.getProperty("variable")) getOrElse """default_value"""

and set them in the command : -Dvariable=yourValue