Store val in session

26 views
Skip to first unread message

Nicolas Breizh

unread,
Mar 20, 2017, 6:04:50 PM3/20/17
to Gatling User Group
Hi,

Strange problem when trying to store value in my session and retrieve it in exec block behind. Here a sample : 

exec(
session => {
val toto = "totototototo"
session.set("cookieval", toto)
}
)
exec(
session => {
println(session)
session
}
)

when printing my session variable, nothing about my cookieval attribute... Anything missing ? 

Guillaume CORRE

unread,
Mar 21, 2017, 2:52:15 AM3/21/17
to gat...@googlegroups.com
Every DSL element in Gatling is a builder. Therefore, nothing happens unless everything is chained properly and given to Gatling's setUp.

You are missing a dot before the second exec.

Cheers!

--
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.
Reply all
Reply to author
Forward
0 new messages