Forum Discussion
Using a Groovy Script test step, enter the following:
def a = testRunner.testCase.getTestStepByName("Test Request - Example").getHttpRequest().getEndpoint()
log.info a
testRunner.testCase.setPropertyValue( "Endpoint", a )
You'll want to change the example request in my code to match your own.This will result in custom Test Case property you can then write out via a DataSink test step.
- RookieOccasional Contributor
- RookieOccasional Contributor
Hi SmartBearAmber,
Thanks for your reply. May be i'm not asking the question properly. I am able to set the Endpoint of the request using the code you have provided. But I have 200 TCs that uses the same request. If i use your approach then I will have manually go in and add the groovy step in all 200 TCs. I want to be able to do it once. Please see image below: