sharajan
10 months agoOccasional Contributor
Is setting the authprofile for a rest step supported by soapui ?
Is setting the authprofile for a rest step supported by soapui ?
def authProfileName = "Name of your profile"
def project = testRunner.getTestCase().getTestSuite().getProject()
def authProfile = project.getAuthRepository().getEntry(authProfileName)
authProfile.setUsername("newUsername")
authProfile.setPassword("newPassword")
authProfile.setDomain("newDomain")
//Set to true for pre-emptive authentication
//Set to false for using global preference
authProfile.setPreemptive(true)
def step = testRunner.testCase.getTestStepByName("Name of your request").getHttpRequest()
step.setSelectedAuthProfile(authProfileNa