Hey ,
I am trying to manually add in a cookie value in my load test to simulate logged in users based on if "sec_user_id" has NOT got the value "none" in the file I am feeding into the test. There seems to be two bits I am stuck on:
1. I can't seem to get the second 'exec' statement to work (highlighted in red) when using doIfEqualsOrElse (I have followed the example in
http://gatling.io/docs/2.0.0-RC5/general/scenario.html)
2. The test seem to like '.addCookie'
val scn = scenario("Jaccess log one hour scenario")
.feed(Jaccess_log)
.doIfEqualsOrElse("${sec_user_id}", "none") {
exec(
http("Search Flow non login")
.get("${URL}")
.check(
status.is(200))
)
} {
exec(
http("Search Flow login")
.get("${URL}")
.addCookie(Cookie("name", "value"))
)
}
Any help would be appreciated.
Thanks
Hui