Cannot pass attribute name in ElFileBody
val writeTestIDs_writer = {
val fos = new java.io.FileOutputStream(“Test_writer.csv”)
new java.io.PrintWriter(fos, true)
}
.foreach("#{TestIDs}", "TesterID") {
exec(
http("Testing API")
.post("/testing")
.body(ElFileBody(session =>
s"""{
|"id": "",
|"TypeId": "000000004532-0000-3421-121212",
|"legs":[{
| "RateTypeId": "030000004532-0000-3421-124444",
| "testerID": "${TesterID}" // Error : Cannot resolve symbol AssetID
| }]
}""".stripMargin)).asJson
.check(jsonPath("$.id").saveAs("resultID"))
.check(status.is(201)))
.exec(session => {
writeTestIDs_writer.println(session("resultID").as[String])
session
})
}
Please help me with a solution