实际值不是字符串错误
执行断言时出错
字段 1 = [1850, 700, 30] 字段 2 = ["1850.0","30.0","700.0"]
错误断言失败:路径:$,实际:[1850, 700, 30],预期:"["1850.0","30.0","700.0"]",原因:实际值不是字符串
是的,因为它不是一个字符串。这将起作用:
* def field1 = [1850, 700, 30]
* def field2 = ["1850.0","30.0","700.0"]
* def field3 = karate.map(field2, function(x){ return ~~x })
* match field1 contains only field3
请看这个其他答案:https://stackoverflow.com/a/57761131/143475