Good afternoon,
I build this check to get an id from the json response body using jsonpath:
.exec(http("request_3")
.post("""/api/sync/210/xyz""")
.headers(headers_1)
.body(RawFileBody("request_3.txt"))
.check(jsonPath("/objects/id").find.saveAs("jl_id")))
When running the simulation I can see this error message:
Request:
request_3: KO jsonPath(/objects/id).exists() didn't match: found nothing
Json response body is below:
body=
[{
"stamp":1376054247,
"objects":[{
"xid":"x-coredata://6C9AA7E9-xxxBD7E3FA0/TechLog/pXYZ",
"id":11055
}]
}]
I need to extract "11055" and save it as a session parameter. Any ideas why this is not working?
I am using Gatling 2.
Many thanks,
Nat