Karate 用于检查数组中是否存在值的空手道表达式
以下是我的示例功能文件:Karate 用于检查数组中是否存在值的空手道表达式,karate,Karate,以下是我的示例功能文件: Feature: Karate expression to check if status within array of status. Scenario: Test * def status = "ACTIVE" * def possibleStatus = ["ACTIVE", "INACTIVE"] * match status contains possibleStatus ? 有没有办法用空手道表情来检查状态是活动的还是不活动
Feature: Karate expression to check if status within array of status.
Scenario: Test
* def status = "ACTIVE"
* def possibleStatus = ["ACTIVE", "INACTIVE"]
* match status contains possibleStatus ?
有没有办法用空手道表情来检查状态是活动的还是不活动的
注意:这完全可以通过编写custome JS函数来实现 这是一个简单的问题
* def status = "ACTIVE"
* def possibleStatus = ["ACTIVE", "INACTIVE"]
* match possibleStatus contains status
任何问题:)是否可以在模式验证中检查相同的内容<代码>定义架构=“{status:?}”“”匹配每个响应。数据包含schema@DJ342不清楚。提出一个新问题,并提供一个恰当的例子。