title: Dynamically create and setup scenarios
body: <p>I'd like to dynamically create and setUp gatling scenarios in a <code>for</code> loop to load test a webservice. </p>
  
  <p>Therefore I tried the following (shortened):</p>
  
  <pre><code>class RecordedSimulation extends Simulation {
  
    val httpProtocol = http
      .baseURL("http://127.0.0.1")
  
    val overallUsers = 1000
  
    val methods: Map[String, Double] = Map(
      "FindContact" -&gt; 0.6,
      "FindAddress" -&gt; 0.3,
      "FindNumber" -&gt; 0.1
    )
  
    for ((methodname, probability) &lt;- methods) {
      val scen = scenario(methodname)
        .exec(http(methodname)
          .get("/contactservice")
          .queryParam("method", methodname))
  
      setUp(scen.inject(constantUsersPerSec(overallUsers * probability) during (60 seconds))).protocols(httpProtocol)
    }
  }
  </code></pre>
  
  <p>If I try running this simulation nothing happens: No simulation is started, also no error appears.</p>
  
  <p>So my question is if it is even possible to dynamically create and setUp gatling scenarios. Am I missing something or doing something wrong?</p>
  
  <hr>
  
  <p>Why do I want to do it dynamically anyway?</p>
  
  <p>Well I have a lot of pretty similar methods to test and I'd like to avoid copy/pasting the same scenario over and over again. </p>