Forum Discussion
Radford
7 years agoSuper Contributor
I think the following code when placed in a Groovy test step will return what you are after:
log.info(testRunner.getTestCase().getTestStepByName('Your HTTP Request Step Name').getRequestStepConfig().getMethod())
The HTTP Request test step is an instance of the class HttpTestRequestStep.
- shubhimu7 years agoContributor
Thanks for Posting your answer!
I also got this using below way:
tc=testRunner.testCase.testSuite.getTestCaseAt(0)
myRequestStep = tc.getTestStepByName('Request')
String requestMethod = myRequestStep.testRequest.method
Related Content
- 4 years ago
- 5 years ago
Recent Discussions
- 16 hours ago