Forum Discussion
Hi Harold,
You can start with the following articles:
How to change credentials for OAuth authorization profiles using Groovy?
How to change credentials for an auth profile using Groovy script?
And refer to the documentation: http://www.soapui.org/apidocs/overview-summary.html
Hey Nastya_Khovrina
Thanks for providing some documentation related to authentication. Finally, I solve my problem thanks to this script :
import com.eviware.soapui.config.AuthEntryTypeConfig; def project = testRunner.getTestCase().getTestSuite().getProject(); def authProfile = project.getAuthRepository().createEntry(AuthEntryTypeConfig.BASIC, "User1212165"); authProfile.setUsername("Username"); authProfile.setPassword("Password"); //authProfile.setDomain("NewDomain"); authProfile.setPreemptive(false); //def request= testRunner.testCase.getTestStepByName("Name of the Step").getHttpRequest(); //request.setSelectedAuthProfile("Name of your profile");
It permit me to add several profiles in Auth Manager window.
Regards
HR
- dhruth7 years agoVisitor
Hi, I tried this for SoapUI 5.4 opensource, but not working? Any idea how to achieve the same for open source.
def step = testRunner.testCase.getTestStepByName("Name of the Step").getHttpRequest();
step.setSelectedAuthProfile("Name of your OAuth profile");Getting error stating "setSelectedAuthProfile" no method found,
- Nastya_Khovrina7 years agoSmartBear Alumni (Retired)
Hi dhruth,
I'm not sure whether it is available in Open Source.
Related Content
- 9 months ago
Recent Discussions
- 5 days ago
- 10 days ago