Using Gatling 2.1.7, am getting a compiler error using “.whatever”:
14:36:41.466 [ERROR] i.g.c.ZincCompiler$ - …scala:25: value whatever is not a member of io.gatling.core.check.ValidatorCheckBuilder[io.gatling.http.check.HttpCheck,io.gatling.http.response.Response,CharSequence,String]
possible cause: maybe a semicolon is missing before `value whatever’?
14:36:41.469 [ERROR] i.g.c.ZincCompiler$ - .whatever
14:36:41.470 [ERROR] i.g.c.ZincCompiler$ - ^
14:36:41.758 [ERROR] i.g.c.ZincCompiler$ - one error found
Snippet of my code:
def extractLink(): HttpCheck = {
regex( “”"<a [^>]*href="([^#"]+)""")
.findAll
.transform(s => util.Random.shuffle(s).head)
.whatever
.saveAs(“link”)
}
def getCheckPause(actionName: String, url : String): ChainBuilder = {
exec(http(actionName).get(url).check(extractLink)).pause(5 seconds)
}
Removing the .whatever line and it works fine (though errors when it doesn’t find any links that match the regex - which I’d like to not count as a KO)
Thanks,
Rob