Help converting a gatling-scala simulation script to gatling-java

Hey Gang, I need some help converting a gatling-scala script I wrote a long time ago into gatling-java. I’m struggling a bit with it because I haven’t used java in a long time. The script references a few scenarios and the tester then selects which scenario set to run when starting from cli. I’ve attached an example version of it here:


import io.gatling.core.Predef._

import scala.concurrent.duration.DurationInt
import scala.language.postfixOps

class ExampleSimulation {

    val httpScenarios = Map (
            "attachUserToSiteByID" -> List(
          .andThen(SiteScenario.scnSiteScenario.inject(rampUsers(5).during(25 seconds))
              "searchAndDeleteUserByID" -> List(

              "someOtherRandomScenario" -> List (
            Load1Scenario.scnWorkspace.inject(nothingFor(5 seconds), rampUsers(Constants.userCount / 3) during(Constants.rampDuration seconds)),
            Load1Scenario.scnPants.inject(nothingFor(5 seconds), rampUsers(Constants.userCount / 3) during(Constants.rampDuration seconds)),
            Load1Scenario.scnTshirts.inject(nothingFor(5 seconds), rampUsers(Constants.userCount / 3) during(Constants.rampDuration seconds))

    setUp(httpScenarios(UserDefinedConfig.testScenario):_*) //testScenario is configured in a config file before run 


Please let me know if this is too vague or if you need more information…I’ve been struggling with this for a day or two.

Thanks for any help you guys can lend!

Oh, I figured how to do this a few days ago so you can close off…