Arunachalam_RM
4 years agoOccasional Contributor
custom authorization in groovy script .need explanation for each in body section?
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(authProfileName);
nmrao rupert_anderson top contributors please help