I am getting the following error in my Gatling code. I am not sure what triggered this. But, unless I wrap my strings in Succes () so that it succeeds as an EL expression -my Gatling code will not run at all.
The exception I see is
Exception in thread “main” io.gatling.core.session.el.ElParserException: Failed to parse “Name” with error '[B cannot be cast to [C
in this example snippet
val scn = scenario("loadtest").during(duration) {
feed(urlList)
.exec(
http("Name")
.get(session => session("url").as[String])
.check(status.is(200)))
}
This is happening all over the place. For example I had to write this .. !!
val httpConf = http
.inferHtmlResources()
.baseURL(baseUrl)
.acceptHeader(s => Success("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"))
.acceptEncodingHeader(s => Success("gzip, deflate"))
.acceptLanguageHeader(s => Success("en-US,en;q=0.5"))
.userAgentHeader(s => Success("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0"))
I had to wrap all names/ strings with Success () or else I will see ELParserException for each of the lines above. I have written such code earlier and there were no such problems earlier.
What can trigger this ?
Thanks
Makarand