匹配和匹配每个案例的最佳条件逻辑

The best conditional logic for match and match each case

所以,我想在我的代码中使用条件逻辑,条件是当我得到 response.response_code == '00' 所以它将 运行

And match response == res_3[0]
And match each response.data.bills == res_3[1]

如果 response.response_code != '00' ,它将 运行

And match response == res_3
And match each response.data.bills == res_3

那么,这种情况下最好的条件逻辑是什么??

请阅读文档:https://github.com/intuit/karate#conditional-logic

使用第二个特征文件:

* eval if (response.response_code != '00') karate.call('it-will-run.feature')

注意:你不能在需要JavaScript的地方使用match,参考: