回应:
{
name : 'Sourabh'
}
实施验证:
And match $.name contains any ['Sourabh','Peter','Babu']
上面的验证失败,如何匹配值(值列表中的任何元素)
验证这一点的方法不止一种,我在举一个工作示例。
* def response = {name : 'Sourabh'}
* def expectedList = ['Sourabh','Peter','Babu']
* match response.name == "#string? expectedList.indexOf(_) != -1"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句