Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.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性能-flushHttpCache_Scala_Gatling - Fatal编程技术网

Scala Gatling性能-flushHttpCache

Scala Gatling性能-flushHttpCache,scala,gatling,Scala,Gatling,刚接触Gatling,正在尝试理解如何将“exec(flushHttpCache)”合并到我的脚本中,因为我正在尝试阻止重定向的发生,因为这些重定向会扭曲我的结果 我有: val getStartPage = feed(feeder).exec(http("Test start page (start-page)") .exec(flushHttpCache) // <- this fails on compile "flushHttpCache is not a member of i

刚接触Gatling,正在尝试理解如何将“exec(flushHttpCache)”合并到我的脚本中,因为我正在尝试阻止重定向的发生,因为这些重定向会扭曲我的结果

我有:

 val getStartPage = feed(feeder).exec(http("Test start page (start-page)")
.exec(flushHttpCache) // <- this fails on compile "flushHttpCache is not a member of io.gatling.http.request.builder.Http"
.get("/start-page?id=${userId}")
.check(status.is(200))
.check(regex("Start now").exists))
.pause(longPause)
我尝试将“.exec(flushHttpCache)”移动到:val happyPath=scenario(“testUsers”)。exec(flushHttpCache)仍然不走运

如何将“flushHttpCache”合并到脚本中

感谢您的帮助

您应该导入

import io.gatling.http.Predef._
不是

问题的第二部分将与您尝试的一样,使用此导入

import io.gatling.http.Predef._
import io.gatling.http.request.builder.Http