Karate 如何通过单独的功能文件迭代参数列表?
如何通过传递ID列表来迭代此操作。我在foo变量中有多个id,我想为该foo变量中的每个可用id调用delete\u project.feature 项目特征Karate 如何通过单独的功能文件迭代参数列表?,karate,Karate,如何通过传递ID列表来迭代此操作。我在foo变量中有多个id,我想为该foo变量中的每个可用id调用delete\u project.feature 项目特征 * def foo = get response.data[*].id * def del = call read('delete_project.feature') Given path 'project', id When method DELETE Then status 200 Then match response.
* def foo = get response.data[*].id
* def del = call read('delete_project.feature')
Given path 'project', id
When method DELETE
Then status 200
Then match response.status == 'success'
删除\u project.feature
* def foo = get response.data[*].id
* def del = call read('delete_project.feature')
Given path 'project', id
When method DELETE
Then status 200
Then match response.status == 'success'
通过将id列表作为输入传递给您的特性,您实际上可以使调用迭代特性多次
* def foo = get response.data[*].id
* def createId = function(x) {return {"id" :x}}
* def ids = karate.map(foo,createId)
* def del = call read('delete_project.feature') ids
空手道