Im getting No attribute named ‘id’ is defined
this is my code
val scn = scenario("Auto Save Load Test")
.exec(
http("Getting entry")
.put("")
.check(status.is(201), jsonPath("$").saveAs("entry")))
.exec(session => {
val textEntry = session("entry").as[Entry]
val updated = textEntry.copy(title = "This is the title set in the gatling test")
session.set("entry", updated).set("id", updated.id.toString)})
.exec(
http("Setting title")
.post("/${id}")
.body(StringBody( """${entry}""")).asJSON
.check(status.is(200), jsonPath("$").saveAs("entry")))
setUp(
scn.inject(atOnceUsers(1)).protocols(httpConfig)
)
Can someone please tell me what I am doing wrong