Forum Discussion
SmartBear_Suppo
11 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 ago
- 5 years ago
- 14 years ago
- 2 years ago
- 10 years ago
Recent Discussions
- 7 days ago