Forum Discussion
2 Replies
Sort By
- RadfordSuper 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.
- shubhimuContributor
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