I’m working on UI performance testing on gatling open source where I came across this scenario :
When clicked on one tab, its redirected to other url (our baseurl changes here) & new tab opens.
Because of this its giving 302 error.
So is this supported in gatling UI performance testing?
Thanks Pete.
I was able to solve this.
Now I want to access a session variable & append it in get request like -
.exec(
http(login method")
.get(“https://google.com/"+"session_variable”)
.headers(headers_0)
)
Is there any way to do this? If yes how can it be done?
As a heads up in this community we try to “teach you how to fish” rather than providing solutions immediately. The idea is that you read the documentation, make your best attempt, if it doesn’t work show us the code and we can help from there
Sure Pete.
I have already checked this documentation & also existing issues related to this here but didn’t find any resolution on the same.
I saw we can get whole url from session like this -
exec(http(“name”)
.get(session → str)
But my query is how to append this session variable with a request url like this -
.get(“https://google.com/”+session->str)
It would be great if you can give me resolution on the same.
I would follow Pete’s advice to look on your own, but at least I can give you some hint, note that this syntax from Gatling 3.9.5, not sure if anything changed in syntax on 3.10.4:
.exec{
session =>
val sessionName = session.set("attribute", "your-value")
sessionName
}
The code block initiate a new attribute in V.U, named attribute, holds your-value, to access this attribute, use: