Hi.
Here is my code:
.check(
jsonPath("$.coupons[?(@.picked==false)].id").findAll.saveAs("coupous_id_list")
)
But in some cases, jsonPath("$.coupons[?(@.picked==false)].id") will return null. So gatling will raise error: jsonPath($.coupons[?(@.picked==false)].id).findAll.exists, found nothing.
How do I omit this error if jsonPath("$.coupons[?(@.picked==false)].id") not exist?
I find a checkIf DSL, but I can't add jsonPath("$.coupons[?(@.picked==false)].id") to checkIf(jsonPath("$.coupons[?(@.picked==false)].id").exists)(jsonPath("$.coupons[?(@.picked==false)].id").findAll.saveAs("coupous_id_list"))
Any ideas?
Thanks.