harinadha
9 years agoOccasional Contributor
Any thought on how to set Authentication type to Basic over the run programmatically
I have a following code to create to create Basic profile for specific test step, def testStep= testRunner.getTestCase().getTestStepByName("RunTimeOperation") testStep.getTestRequest().addBasic...
- 9 years ago
You need to select the authentication profile. The following code should do the job:
testStep.getTestRequest().setSelectedAuthProfileAndAuthType('Basic', AuthType.PREEMPTIVE)
For other types of authetication see the API docs:
https://www.soapui.org/apidocs/com/eviware/soapui/config/CredentialsConfig.AuthType.html
- 9 years ago
Thank you for the response. and i have resolved the issue by adding the following code.
testStep.getTestRequest().setSelectedAuthProfileAndAuthType(AbstractHttpRequest.BASIC_AUTH_PROFILE,CredentialsConfig.AuthType.PREEMPTIVE)
and it is the same as you mentioned above.