11 years ago
Can't create groovy script for run REST request. Please help
Hi all,
I have a task to create groovy script which will run REST request and setup property.
I setup property by script:
testRunner.testCase.setPropertyValue( "ScriptProFrom", "BIF" )
testRunner.testCase.setPropertyValue( "ScriptProTo", "STD" )
But I can't find how to run REST request. I tried to do it like this:
myInterface = (RestService) testRunner.testCase.testSuite.project.getInterfaceByName("http://www.webservicex.net")
myOperation = myInterface.getOperationByName("ConversionRate")
myRequest = myOperation.getRequestByName("Request 1")
and get "Script-result: com.eviware.soapui.impl.RestRequest@6a80901" and it cool if it my request, but how to run it?
Please, help...
I have a task to create groovy script which will run REST request and setup property.
I setup property by script:
testRunner.testCase.setPropertyValue( "ScriptProFrom", "BIF" )
testRunner.testCase.setPropertyValue( "ScriptProTo", "STD" )
But I can't find how to run REST request. I tried to do it like this:
myInterface = (RestService) testRunner.testCase.testSuite.project.getInterfaceByName("http://www.webservicex.net")
myOperation = myInterface.getOperationByName("ConversionRate")
myRequest = myOperation.getRequestByName("Request 1")
and get "Script-result: com.eviware.soapui.impl.RestRequest@6a80901" and it cool if it my request, but how to run it?
Please, help...