want to test assertion of integer value should be >3 in Karate API

前端 未结 1 1660
星月不相逢
星月不相逢 2021-01-24 03:02

json response is \"Value\": 0.23

i want to put assertion here value should be less than 3 so how to do this ? tried some examples in documentation but they are for arra

相关标签:
1条回答
  • 2021-01-24 03:24

    You can construct it as below:

    * def resp = { "Value": 0.23 }
    * match resp == { "Value": '#? _ < 3' }
    * match resp.Value == '#? _ < 3'
    
    0 讨论(0)
提交回复
热议问题