{"offerId": "${offerId}", "membershipId": "${memberID}", "osName": "Android", "osVersion": "4.4"}
memberID,offerId8107222059,000C297765971EE495BE0BA921A125F78107222052,000C297765971EE495BE0BA921A125F7
val scn = scenario("Scenario")
.feed(csv("memberInfo.csv").random)
.exec(_.set("TOKEN", "${memberID}"))
.exec( http("buyGift") .post("/gift/buy") .header("X-Token", "${TOKEN}") .body(ELFileBody("buyGift.json")).asJSON .check(status.is(200)) .check(jsonPath("$.resultCode").is("SUCCESS")) ) }Request:getProfile: OK =========================Session:Session(Scenario,354820329020934272-2,Map(memberID -> 1361300128, offerId -> 000C297765971EE495BE0BA921A125F7, TOKEN -> ${memberID}, gatling.http.cache.etagStore -> Map(https://myapp.sweet.se/user/profile -> "KXHNPNILBKTUOSY")),1416233886732,0,OK,List(),<function1>)=========================HTTP request:headers=X-Token: ${memberID}charset: UTF-8Content-Type: application/jsonAccept-Encoding: gzip,deflateUser-Agent: Android(4.4)/Sweet(0.4)/0.1Connection: keep-aliveHost: myapp.sweet.seAccept: */*=========================HTTP response:status=200 OKheaders= Age: [19461]Date: [Mon, 17 Nov 2014 08:53:46 GMT]Connection: [Keep-Alive]ETag: ["KXHNPNILBKTUOSY"]Content-Type: [application/json;charset=UTF-8]Content-Length: [223]Server: [Jetty(9.2.4.v20141103)]
body=--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import io.gatling.core.Predef._import io.gatling.http.Predef._import scala.concurrent.duration._
class XSimulation extends Simulation {
val httpConf = http .baseURL("https://myapp.sweet.se") .acceptEncodingHeader("gzip,deflate") .headers(Map("Content-Type" -> "application/json", "charset" -> "UTF-8", "User-Agent" -> "Android(4.4)/Sweet(0.4)/0.1"))
val scn = scenario("Scenario")
.feed(csv("memberInfo.csv").random) .exec( http("getProfile") .get("/user/profile") .header( "X-Token", "${memberID}" ) .exec( http("getGiftList") .get("/gift/all") .header("X-Token", "${memberID}") setUp(scn.inject(constantUsersPerSec(1) during (1 minutes))).protocols(httpConf)
}{"offerId": "${offerId}", "membershipId": "${memberID}", "osName": "Android", "osVersion": "4.4"}.exec( http("activateGift") .post("/gift/activate") .header("X-Token", "${memberID}") .body(ELFileBody("activateGift.json")).asJSON