Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 从列表创建gatling馈线_Scala_Performance Testing_Gatling_Scala Gatling - Fatal编程技术网

Scala 从列表创建gatling馈线

Scala 从列表创建gatling馈线,scala,performance-testing,gatling,scala-gatling,Scala,Performance Testing,Gatling,Scala Gatling,我是加特林和斯卡拉的新手。 我有一个记录设置值的列表。我想稍后迭代该列表以测试get操作。我该怎么做呢 我基本上希望feeder对列表中给定的数据不断重复 我试着在下面的方式创建馈线。但这是个例外 val setupDeleteExtensions = List.empty[String] // I populated some values to setupDeleteExtensions List val extensionIds = Iterat

我是加特林和斯卡拉的新手。 我有一个记录设置值的列表。我想稍后迭代该列表以测试get操作。我该怎么做呢

我基本上希望feeder对列表中给定的数据不断重复

我试着在下面的方式创建馈线。但这是个例外

      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]]
val setupDeleteExtensions=List.empty[字符串]
//我向setupDeleteExtensions列表填充了一些值
val extensionId=Iterator.continuously(for(extensionId extensionId)
})
val extMgrScenerio=scenario(“extensionMgr-scenario”)
.期间(配置.持续时间){
退出锁定失败(
组(“负载测试”){
执行官(
速度(Configuration.paceFrom、Configuration.paceTo),
提要(扩展ID)
随机开关(
50.00->组(“获取并确认”){
执行官(
extmgrChain.getExtension(),
extmgrChain.getAcknowledge()
)
},
50.00->extmgrChain.getResource(),
)
)
}
)
}
例外情况:
找到:迭代器[List[scala.collection.immutable.Map[String,String]]
必需:io.gatling.core.feeder.FeederBuilder
(扩展为)()=>Iterator[scala.collection.immutable.Map[String,Any]]
有人能帮你从列表中创建一个feeder吗

val extensionIds = Iterator.continually(for (extensionId<-extmgrChain.setupInstallExtensions) yield {
    Map("extensionId" -> extensionId)
})
val extensionIds = extmgrChain.setupInstallExtensions.map(id => Map("extensionId" -> id)).iterator