【发布时间】:2019-12-04 17:32:47
【问题描述】:
我正在尝试从响应中检索 animalId 值。该数组是动态的,因此我尝试使用def animalIds = response.animals[*].animalId 从数组中检索animalId 值。
回复:
{
"animals": [
{
"animalId": "1234565",
"animalName": "Tom"
},
{
"animalId": "1234567",
"animalName": "Dave"
}
]
}
但是,当我执行我的功能文件时,我收到以下错误:
response.animals[*].animalsId
^ in <eval> at line number 1 at column number 18
com.intuit.karate.exception.KarateException: there are test failures !
at ...(.)
The terminal process terminated with exit code: 1
关于如何解决此问题的任何想法?
【问题讨论】: