Forum Discussion
SmartBear_Suppo
10 years agoSmartBear Alumni (Retired)
Hi,
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
Related Content
- 6 years ago678
- 5 years agokaiiii
- 2 years agojaredjamieson
- 13 years agojitendra_1
- 3 years agoWarseng
Recent Discussions
- 4 days agominhng