简体   繁体   English

Gatling Feeder - 从列表中获取信息

[英]Gatling Feeder - get info from a list

I want to create new Gatling feeder on a list[Strings] from the memory.我想在 memory 的列表 [Strings] 上创建新的加特林馈线。

In the scenario, I am executing this:在这个场景中,我正在执行这个:

 **.feed(GetGroupIdFeeder.getGroupIdFeed)**

My feeder looks like that:我的进纸器看起来像这样:

val getGroupIdFeed: Iterator[Map[String, List[String]]] = { Iterator.continually(Map("groups" -> myList)) } val getGroupIdFeed: Iterator[Map[String, List[String]]] = { Iterator.continually(Map("groups" -> myList)) }

My list look like that: my_List["a", "b", "c"]我的列表如下所示: my_List["a", "b", "c"]

in results I am getting:结果我得到:

myList["a", "b", "c"] as expected from the feeder... myList["a", "b", "c"]正如进料器所期望的那样......

My expectations is to get from the feeder only "a"我的期望是从进纸器中只得到“a”

I am aiming that my feeder will be configured as circular.我的目标是将我的进纸器配置为圆形。

meaning:意义:

when calling the feeder:调用馈线时:

  • first time I will get "a"第一次我会得到“a”
  • second time I will get "b"第二次我会得到“b”
  • tired time "c"疲倦的时间“c”
  • 4th time I will get "a" again第四次我会再次得到“a”

thanks !谢谢 !

val getGroupIdFeed = Iterator.continually(List("a", "b", "c"))
  .flatten
  .map(value => Map("groups" -> value))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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