Reputation: 2334
I am having some 100 Request in one folder.I wish to run all the request one by one and need to capture the response for all the request in SOAP UI.
Could someone help me on this with the details?
Upvotes: 4
Views: 30334
Reputation: 21369
Here you can create a test case with two steps:
Groovy Script step:
SOAP Request Step this will initially have some request, and above groovy step overwrites each time it reads file.
So, you have to implement the groovy using above sudo steps.
Hope this helps.
UPDATE based on the below comments, adding the groovy script.
/**
* Closure definition requires inputs
* stepIndex : index of the request step where new content to be set
* contentToSet : the new request read from file
**/
def setRequest = { stepIndex, contentToSet ->
def step = context.testCase.testStepList[stepIndex]
step.testRequest.requestContent = contentToSet
}
//You may read a directory get the list of files and loop thru below steps for each file
//Read the request from file
def content = new File('/file/absolute/path').text
//Call above closure
//Assuming that Test Request step the second step, index becomes 1
setRequest(1, content)
Upvotes: 3