Created
June 20, 2017 13:33
-
-
Save rajendrapenumalli/385cce81821ca78bcfbb5f89c5e66edf to your computer and use it in GitHub Desktop.
Adding HTTP Get Request Via Groovy in SOAPUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static com.eviware.soapui.impl.wsdl.teststeps.registry.HttpRequestStepFactory.HTTPREQUEST_TYPE | |
| //Provide the http request endpoint in the below | |
| def endpoint = 'http://google.com' | |
| //Valid http method GET | PUT | POST | DELETE etc | |
| def method = 'POST' | |
| def stepName = 'httpPostRequestStep' | |
| def tc=testRunner.testCase.getTestStepByName(stepName).s | |
| //Adds http request step to given test case assumes tc is valid object of TestCase | |
| tc.addTestStep(HTTPREQUEST_TYPE , stepName, endpoint, method) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment