简体   繁体   中英

Share a feeder among Gatling simulations

I am using a CSV feeder to feed multiple simulations. When run using gatlingRun, every simulation starts reading the file from the beginning. I am keeping the feeder in an object variable (must behave like a static variable):

object MyFeed  {
  val dataFile: String = Settings.dataFile

  val randomFeeder  = feed(tsv(dataFile))
}

object MySimulation extends Simulation{
    val myScenario: ChainBuilder =  MyFeed.randomFeeder
}

Is there a way to make all simulation use the same instance of the feeder or make each one continue where the others finished?

Gatling doesn't have any memory that survives between simulations. You'd have to implement this yourself.

I solved the problem for now by providing a separate data file and feeder for each simulation.

I hope someone finds a better solution or something changes in future releases!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM