I have to run xml request in soap ui with variable.as I understand it is possible with using groovy script. My variable ($variable) should be like:
for (i = 0; i < 5; i++) {
createResult(34620000+i)
}
Request looks like:
SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:xmethods-delayed-quotes">
<SOAP-ENV:Body>
<wq:test>
<Date xsi:type="xsd:string">2015-01-26</Date>
<Data ..."$variable"...</Data>
</wq:test>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Could someone help me to send such request. Or maybe there is another way to send multiple requests?
Here you go: Define a test case with 3 steps
//run the SOAPRequestStep 5 times, increase as needed
for(int i=0;i<5;i++) {
testRunner.testCase.setPropertyValue('VARIABLE',i.toString()) //set whatever String value required in place of i.toString()
testRunner.runTestStepByName('SOAPRequestStep')
}
testRunner.runTestStepByName('ExitScript')
log.info "Running Exit Script"
Now run the test case.