0
  class PostRequest extends Simulation {

  val httpProtocol = http
  .baseUrl("https://myurl.com")
  .inferHtmlResources()
  .acceptHeader("text/html,...v=b3")
  .acceptEncodingHeader("gzip, deflate")
  .acceptLanguageHeader("en-GB,....")
  .upgradeInsecureRequestsHeader("1")
  .userAgentHeader("Mozilla/5.0 ....Safari/537.36")

  val uuid = Iterator.continually(Map("val" -> java.util.UUID.randomUUID.toString()))

  val scn = 
  exec(_.set("uuid",uuid))
  scenario("PostRequest")
    .feed(uuid)
    .exec(http("request_0")
    .post("/path/")
    .body(StringBody("""
          {
              "Id": "${uuid}",
              "one": 
                {
                  "id": "${uuid}",
                  "channel": "EMAIL",
                  "timeStamp": "2018-05-01-22.23.23.123456",
                }
    }
  """))
     )

  setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
    }

while compiling, i am getting error

value inject is not a member of io.gatling.core.structure.ChainBuilder
setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.