本文介绍了如何发送动态多部分数据请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下列表显示了不同的动态分段请求
Below lists shows different dynamic multipart requests
请求_1
Given url appServer
And path '/integration/rest/application/WmSOAPProvider'
* configure charset = null
Given multipart file properties = { read: 'classpath:ic/feature/soap/TestData/soapInputWSDLData.json', filename: 'blob', contentType: 'application/json' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename1)', contentType: 'application/xml' }
And header Content-Type = 'multipart/form-data'
When method post
Request_2
Given url appServer
And path '/integration/rest/application/WmSOAPProvider'
* configure charset = null
Given multipart file properties = { read: 'classpath:ic/feature/soap/TestData/soapInputWSDLData.json', filename: 'blob', contentType: 'application/json' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename1)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename2)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename3)', contentType: 'application/xml' }
And header Content-Type = 'multipart/form-data'
When method post
Request_3
Given url appServer
And path '/integration/rest/application/WmSOAPProvider'
* configure charset = null
Given multipart file properties = { read: 'classpath:ic/feature/soap/TestData/soapInputWSDLData.json', filename: 'blob', contentType: 'application/json' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename1)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename2)', contentType: 'application/xml' }
And header Content-Type = 'multipart/form-data'
When method post
Request_4
Given url appServer
And path '/integration/rest/application/WmSOAPProvider'
* configure charset = null
Given multipart file properties = { read: 'classpath:ic/feature/soap/TestData/soapInputWSDLData.json', filename: 'blob', contentType: 'application/json' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename1)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename2)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename3)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename4)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename5)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename6)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename7)', contentType: 'application/xml' }
Given multipart file wsdlFiles = { read: '#(wsdlFilesPath)', filename: '#(wsdlFilename8)', contentType: 'application/xml' }
And header Content-Type = 'multipart/form-data'
When method post
request1
,request2
,request3
,request4
都具有动态的多部分wsdl文件输入.使用空手道使它通用,以便它可以工作任何数量的multipat wsdlfile
request1
,request2
,request3
,request4
all are having dynamic multipart wsdl file input.Using Karate how to make it generic so that any number of multipat wsdlfile it should work
推荐答案
请参见 multipart files
关键字,它使您可以处理文件数量是动态的情况.
See the multipart files
keyword, that allows you to handle when the number of files is dynamic.
这篇关于如何发送动态多部分数据请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!