Hi All -
I’m having an issue injecting cookies into an initial request sent in my test. According to this page: http://gatling.io/docs/2.1.4/http/http_helpers.html I think I’m getting the syntax correct, but the site isn’t responding the way I think it should. The cookies I’m setting should result in subsequent requests sent to the mobile site. When I turn on debugging, I don’t see my cookies in the “Set-Cookie” line in the headers of the HTTP response. Here is the code I wrote. Is there something obvious I’m doing wrong?
(Also - I’m having trouble with my messages getting to google groups. Apologies if this message gets posted multiple times. I sent the original one 8 hours ago but yet the test message is sent showed up immediately.)
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import util.Random
object Headers {
…
}
object HomepageScenarios {
val cities_m = scenario(“mobile”)
.feed(citiesData)
.exec(addCookie(Cookie(“cookie1”, “1”)))
.exec(addCookie(Cookie(“cookie2”, “${city_id}”)))
.exec(addCookie(Cookie(“cookie3”, “1”)))
.exec(http(“get mobile page”)
.get(“https://url.com/cities/${city_id}-${city_url_name}/deals”))
.exec(flushSessionCookies)
}
class LSCitiesM extends Simulation {
setUp(HomepageScenarios.cities_m.inject(constantUsersPerSec(75) during(60*5 seconds))).protocols(Headers.httpProtocolAndroid)
}