Forum Discussion
SmartBear_Suppo
Alumni
12 years agoHi,
Create a testCase level property "url" or any other named variable,
Add a groovy script teststep,
Transfer the endpoint from the property to request. You can also make it dynamic with substring or regex.
Thanks,
Jeshtha
Create a testCase level property "url" or any other named variable,
Add a groovy script teststep,
def response = context.expand( '${Xml - Request 1#Response#$.href}' )
log.info response
response = response.replaceAll( "\\{\\?page,size,sort,name,status\\}", "" )
log.info response
testRunner.testCase.setPropertyValue( "url", response )
Transfer the endpoint from the property to request. You can also make it dynamic with substring or regex.
Thanks,
Jeshtha