Missing flood packages

To get the most out of Gatling integration with Tricentis Flood you will need to import flood._ packages in your test plan.

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

// Mandatory, you must import Flood libraries
import flood._

class TestPlan extends Simulation {

  // Optional, Flood IO will pass in threads, rampup and duration properties from UI
  val threads   = Integer.getInteger("threads",  10)
  val rampup    = Integer.getInteger("rampup",   10).toLong
  val duration  = Integer.getInteger("duration", 15).toLong

  // Mandatory, you must use httpConfigFlood
  val httpProtocol = httpConfigFlood
    .acceptEncodingHeader("gzip, deflate")

  val scn = scenario("Scenario Name")
    .pause(1000 milliseconds, 5000 milliseconds)

  setUp(scn.inject(ramp(10 users) over (60 seconds))).protocols(httpProtocol)

Last updated