not found: value $
not found: value value
TestScript is the only simulation, executing it.
${value}
not found: value value
11:43:00.080 [ERROR] i.g.c.ZincCompiler$ - val x = s"${value}"
@volatile var val1 = ""
.exec(session=>{so, when I print val1, I can see the value. But when I try to use that in a separate function, Its again printing ${value}
val1 = session("authHeader").as[String]
println(val1)
session
})
exec(session=>session.set("value",session("authHeader").as[String]))
exec(test.dummy)
object test{
def dummy: String = {
val x = """"${value}""""
println(x)
return x
}
}
Warning
This Expression Language only works on the final value that is passed to the DSL method when the Simulation is instantiated.
For example, queryParam("latitude", "${latitude}".toInt + 24)
won’t work, the program will blow on "${latitude}".toInt
as this String can’t be parsed into an Int.
The solution here would be to pass a function:
session => session("latitude").validate[Int].map(i => i + 24)
.
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
.exec(session=>session.set("value",session("authHeader").as[String]))
.exec(test.dummy)
object test{
def dummy: String = {
val x: String="${value}"
println(x)
return x
}
}
Device is the only simulation, executing it.
${value}
Simulation Device started...
16:33:04.728 [ERROR] i.g.c.a.b.SessionHookBuilder$$anon$1 - 'hook-1' failed to execute: Can't cast value 15dc8b3d3c7+13ec0afafvdfdfgddfgf0ddf84682b78e of type class java.lang.String into class io.gatling.core.session.Session
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.