I have a jmeter test which should exit when the response array is null. To test this, I'm accessing array and checking length in the beanshell assertion. I have tried
jsonpath Expression:$.x.length
where as in html response the array looks like {"x":[]}. I got "xtract failed com.jayway.jsonpath.PathNotFoundException: Path 'length' is being applied to an array. Arrays can not have attributes". How do I test if the array is null or array length null or zero. Thanks for the help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.