Forum Discussion
HaroldR
Contributor
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
dhruth
7 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
- 10 months ago
- 10 years ago
Recent Discussions
- 18 days ago