gatlingでfeedを無限に生成したい
ソース
class HogeSimulation extends Simulation {
val r = scala.util.Random
val feeder = Iterator.continually {
var id = r.nextInt(9999) + 1
Map(
"uid" -> id,
"screen_name" -> ("stress_" + id.toString),
)
}
val scn =
scenario("Login Users")
.feed(feeder)
.exec(...)
setUp(
scn.inject(constantUsersPerSec(Configuration.users) during (Configuration.duration seconds) )
).protocols(Configuration.httpProtocol)
}
参考
Gatling Open-Source Load Testing Documentation – For DevOps and CI/CD
メモ
Custom feeder with random data for Gatling は良さそうと思ったが、使えなかった。古い?