sukanya
6 years agoContributor
SoapUI Pro
Hi, How can I run a request using groovy script without using testRunner.runTestStepByName("Request"). Is there any other alternate way? Thanks
Why dont you add groovy test step and take the response of your request there only and run what ever test step you have from that particular groovy test step itself.
I hope this will help you.
Thanks,
Himanshu
Yes, I can add there but my client requirement is to add it under the script assertion.
I think below will solve your problem.
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
def Runner = new WsdlTestCaseRunner(messageExchange.modelItem.testStep.testCase, new StringToObjectMap())
testStep= messageExchange.modelItem.testStep.testCase.testSuite.project.testSuites["A"].testCases["A"].testSteps["SOAP Request1"]
testStep.run(Runner,context)
Hi,
I want to be done for REST requests not for Soap Requests. My two test steps in the project are REST requests.