【发布时间】:2023-03-12 19:53:01
【问题描述】:
我正在尝试对我遇到的需要执行匹配的场景之一执行 If Else 条件。目前,我通过 Karate.call() 处理它,同时具有真假条件并在那里进行匹配,但将它内联对我来说会更短。我知道不建议使用条件逻辑,但这是一个例外
**Current Implementation**
* def result = (response.status == 200) ? karate.call('listinPage.feature@FilterValidationPositive', {a: response, b:dbRows}) : karate.call('listinPage.feature@FilterValidationNegative', {a: response, b:dbRows})
**Desired**
Something along :
if (response.status == 200) match response.comment == 'xyz' else match response.comment == 'abc'
【问题讨论】:
标签: conditional-statements karate