Solved
Forum Discussion
Nastya_Khovrina
SmartBear Alumni (Retired)
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
HaroldR
7 years agoContributor
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
Related Content
- 3 months agoStoplight