【发布时间】:2020-04-14 12:13:31
【问题描述】:
我是 gatling 和 scala 的新手。 我有一个列表,我在其中跟踪 setupValues 。我想稍后遍历该列表以测试 get Operations 。我怎样才能做到这一点。
我基本上希望馈线连续重复列表中的给定数据。
我尝试以下面的方式创建馈线。但它抛出异常
val setupDeleteExtensions = List.empty[String]
// I populated some values to setupDeleteExtensions List
val extensionIds = Iterator.continually(for (extensionId<-extmgrChain.setupInstallExtensions) yield {
Map("extensionId" -> extensionId)
})
val extMgrScenerio = scenario("extensionMgr - Scenario")
.during(Configuration.duration) {
exitBlockOnFail(
group("load-test") {
exec(
pace(Configuration.paceFrom, Configuration.paceTo),
feed(extensionIds)
randomSwitch(
50.00 -> group("get and Acknowledge") {
exec(
extmgrChain.getExtension(),
extmgrChain.getAcknowledgement()
)
},
50.00 -> extmgrChain.getResource(),
)
)
}
)
}
exception :
found : Iterator[List[scala.collection.immutable.Map[String,String]]]
required: io.gatling.core.feeder.FeederBuilder
(which expands to) () => Iterator[scala.collection.immutable.Map[String,Any]]
有人可以帮忙看看如何从列表中创建一个馈线
【问题讨论】:
标签: scala performance-testing gatling scala-gatling