在空手道api测试中不存在iRequired请求部分'文件'

时间:2018-03-02 22:51:11

标签: karate

当我尝试使用以下功能时,我收到了必需的请求部分'文件'不存在 功能:验证API正确返回产品

Background:
* url 'http://localhost:8080'

Scenario: Products are returned on post

Given path 'upload'
And multipart field files = read('test.txt')    
When method post
Then status 200
And match $ == {error: false, bytesUploaded:'#notnull'}

请为文件上传API测试提供正确的解决方案或替代方案

0 个答案:

没有答案