Hi ,
I am new to Gatling. I am not understanding why new session is getting created for each request. they all belong to one scenario. Can you please help me. Below is the code what i am using. For the below higlighted requests i am expecting to have one session,. But they all have different sessions. Can you please help me
val httpProtocol = http
.baseURL(“http://d070277:7002”)
.inferHtmlResources()
.acceptHeader("/")
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“en-US,en;q=0.5”)
.connection(“keep-alive”)
.contentTypeHeader(“text/plain;charset=UTF-8”)
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0”)
val headers_0 = Map(
“Accept” → “text/plain, /; q=0.01”,
“X-Requested-With” → “XMLHttpRequest”)
val headers_3 = Map(“Accept” → “text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”)
val headers_4 = Map(“Accept” → “text/css,/;q=0.1”)
val headers_28 = Map(“Accept” → “image/png,image/;q=0.8,/*;q=0.5”)
val headers_37 = Map(“X-Requested-With” → “XMLHttpRequest”)
val uri1 = “http://d070277:7002/NBSUI-web”
val scn = scenario(“RecordedSimulation”)
.feed(cia_numbers)
.exec(http(“request_0”)
.get("/NBSUI-web/resources/i18n/messages.properties?_=1424104909979")
.headers(headers_0)
.resources(
http(“Basic customer profile”)
.get(uri1 + “/initialPage?phone=${phoneNumber}&languageCode=EN&num=2”)
.headers(headers_3),
http(“full CMPS”)
.get(uri1 + “/nextBestSave/getCustomerValue?subscriptionId=${subscriptionId}&phone=${phoneNumber}&languageCode=EN&=1424104945682")
.headers(headers_37),
http(“USG SUM”)
.get(uri1 + "/nextBestSave/getHistoryUsage?subscriptionId=${subscriptionId}&phone=${phoneNumber}&languageCode=EN&=1424104945683”)
.headers(headers_37),
http(“USG MGMT”)
.get(uri1 + “/nextBestSave/getCurrentUsage?subscriptionId=${subscriptionId}&phone=${phoneNumber}&languageCode=EN&=1424104945684")
.headers(headers_37),
http(“RTAA request”)
.get(uri1 + "/nextBestSave/getOffers?subscriptionId=${subscriptionId}&phone=${phoneNumber}&languageCode=EN&=1424104945685”)
.headers(headers_37)
))
setUp(scn.inject(rampUsers(5) over (5 seconds) )).protocols(httpProtocol)
Thanks
Tarini