NAVTEQ_Support_1
14 years agoContributor
Reding REST URL with fully expanded properties
Hi,
I’m facing problem to get full URL for REST request with Groovy. This is the code:
import com.eviware.soapui.impl.wsdl.teststeps.*
for( testStep in testRunner.getTestCase().getTestStepList() ) {
def endpoint = testRunner.testCase.testSteps[testStep.getLabel()].getPropertyValue("Endpoint");
def path = testRunner.testCase.testSteps[testStep.getLabel()].getResource()
log.info context.expand(endpoint + path.getFullPath(true) );
}
However, this approach returns following output:
Wed Sep 14 12:52:59 CEST 2011:INFO:http://localhost:8080/layer/{id}/{objectId}
Obviously, I'd like to see the id and objectId properties expanded into their actual value and receive http://localhost:8080/layer/street/911
Getting values for properties with: “testRunner.testCase.testSteps[testStep.getLabel()].getPropertyValue("id")” is possible of course but I would like to know if there is simpler way to do this, read the actual URL fully interpreted, it has to be there somewhere...
Thanks,
roman
I’m facing problem to get full URL for REST request with Groovy. This is the code:
import com.eviware.soapui.impl.wsdl.teststeps.*
for( testStep in testRunner.getTestCase().getTestStepList() ) {
def endpoint = testRunner.testCase.testSteps[testStep.getLabel()].getPropertyValue("Endpoint");
def path = testRunner.testCase.testSteps[testStep.getLabel()].getResource()
log.info context.expand(endpoint + path.getFullPath(true) );
}
However, this approach returns following output:
Wed Sep 14 12:52:59 CEST 2011:INFO:http://localhost:8080/layer/{id}/{objectId}
Obviously, I'd like to see the id and objectId properties expanded into their actual value and receive http://localhost:8080/layer/street/911
Getting values for properties with: “testRunner.testCase.testSteps[testStep.getLabel()].getPropertyValue("id")” is possible of course but I would like to know if there is simpler way to do this, read the actual URL fully interpreted, it has to be there somewhere...
Thanks,
roman